????1.???????MySQL????
???????????
??????--> ????--> MySQL--> ?????????????????
???????-1- ??????????????????????services.msc
????-2- ??????????????????????????????????
????????????
??????????????????
????net start|stop mysql
????2.???MySQL??????
????mysql -u????? -p???? ??????????????????????
????mysql -u????? -p???? -h????????IP -P????
??????????????mysql:3306?? oracle:1521?? SQL Server:1433
????3.????????
????-1- ???????????show databases;
????-2- ?????????create database ???????;
????create database if not exists ???????; ??????????
????-3- ???????(????)?????use ???????;
????-4- ???????????????select database();
????-5- ?????????alter database ???????;
????-6- ????????drop database ???????;
???????1) ???????utf8 gb2312|gbk
????2) ????????棺InnoDB??MyISAM??MERGE??CSV??
????????DML?????????????????????????????--> MyISAM
???????????DML????????????????????????????????????λ--> InnoDB
????4.????????
????-1- ??????
????create table ????(
?????????1 ???????? [null | not null] [auto_increment] [comment '???????']??
?????????2 ???????? [null | not null] [comment '???????']
?????????3 ???????? [null | not null] [default '?'] [comment '???????']
????constraint PK_????_????? primary key??
????constraint UQ_????_????? unique(?????)??
????constraint FK_??????_???_????? foreign key(??????) references ??????(????)
????);
????-2- ??????select * from ????;
????-3- ??????drop table ????1??????2...
????????????????????????????????????????????
????5.DML(???????????)??????????????????
????-1- ????insert into ????(?????) values(?);
???????1????ε???????????????????????????????????
????2?????????в?????????Σ????????????????????????????insert into ???? values(?);
????3????????к?????????(?????)????????????????????????????
????-2- ???£?update ????
????set ??? = ??? [????? = ???]
????[ where ???? ];
???????where?????????????????????????????????????????????????where??????????????
????-3- ?????delete from ????
????[ where ???? ];
????????where????б????????(null)???????? ????? = null??????? ????? is null | not null