?????????
????Set sql_mode=’strict_trans_tables’??  ?洢????????????????????????????
????Create table t3(id int(4) primary key auto_increment??sname char(4));   ????id???????
????Create table t3(id int(4) primary key auto_increment??sname char(4))auto_increment=100;        id??100??????????
????Alter table t3 auto_increment=200;   ???????????id??200???
????Set @@auto_increment_increment = 5;    ????????????????????5
????Delete from t3;     ???t3???е??????id?????????????????????????
????Truncate t3;   ????????id????????1???
????Create table t3(id int(4) primary key auto_increment??gender char(4) default’????’); ??????????
????Create table t3(id int(4) primary key auto_increment comment ‘t3???????’????gender char(4) default’????’ comment ‘???’) comment=‘?????’; ???????????
????1??create able ??????…??engine = myisam
????2??create able ??????…??engine = innodb            ??????????棬??????
????Create database db character set gbk collate gbk_chinese_ci;       ?????????????gbk????У??????…
????Set names gbk;     ?????????????????
????Create table ??????…??charset = utf8;    ??????????????
?????????????
????Alter table ????? rename as ?±?????  ??????
????Alter table ???? add ????? ??????????????   ???????
????Alter table ???? modify ????? ??????????????  ??????
????Alter table ???? change ??????? ??????? ???????????? ??????????????
????Alter table ???? drop ???????  ??????
????Alter table ???? add constraint ?????? primary key(?????);  ???????
????Alter table ???? add constraint ????? foreign key(???????????) ???????????????????????????  ??????
????Alter table ????drop primary key;  ???????
??????????
????Drop table[if exists] ??????   ?????
????Truncate????
?????????????????????????????????????????  Truncate [table] table_name
??????delete??????????
?????????????????????????????????truncate??????
????????????truncate table ????????auto_increment??????
???????truncate table??????????????
?????????ACID???
????????????????????????????
????DQL??????????????
????Distinct?????
???????select?????????????????????????????
????????select distinct ?????1???????2…from ????
????Select version();   ????汾??
????Select @@auto_increment_increment;   ???????
??????????
????Select * from student were studentname like ‘%:%%’ escape ‘:’;??e??????????????escape
???????????????????inner?????
????Select ???1?????2??… from table_1 inner join table_2 on table_1.???x=table_2.???y
?????????????left join
????Select ???1?????2??… from table_1 left[outer] join table_2 on table_1.???x=table_2.???y
????Mysql??limit??
????Select * from ‘????’ limit 5??   ?????5?????
????Select * from ‘????’ limit 5??10??  ??????6????????10?????
????Group by???÷???????having??????
????Select count(r.studentNo) ‘??????’??max(r.studentresult) ‘???’?? min(r.studentresult) ‘???’??avg(r.studentresult) ‘?????’??r.subjectNo from result r group by r.subjectNo having avg(r.studentresult)>=60;   ????????γ???飬????????????????????????????60??????????????
???????????????????????????У???????????????????????select????