????????1----ALTER
???????д??????壺?????????my_foods????????????е??? ???????
????ALTER TABLE my_contacts????--??????
????ADD COLUMN id INT NOT NULL AUTO_INCREMENT FIRST????????--?μ? ?? id????????У?????????λ
????ADD PRIMARY KEY (id);????--???????????id?????????
?????????????????????????? PRIMARY KEY ?????
?????????????
????FIRST - --?? ??id ???????????????е????
????LAST -- ???? id ???????????е????
????SECOND -- ???? id ????? ???????
????AFTER(column1) -- ???? id ???? column1 ????
????BEFORE(column2) -- ???? id ???? column2 ???
?????????????
????ADD --- ???????????????——????????????????
????CHANGE--- ????????????е????????????????
????ALTER TABLE my_contacts
????CHANGE COLUMN breakfast morning_foods  VARCHAR(20);??????-- ??????breakfast??? morning_foods ???μ?????? VARCHAR(20)
????MODIFY ---????????е????????????λ??
????ALTER TABLE my_contacts
????MODIFY COLUMN morning_foods  AFTER id;
????DROP -- ???????????
????ALTER TABLE my_foods
????DROP COLUMN morning_foods;
????RENAME TO ----????????????
????ALTER TABLE my_contacts
????RENAME TO contacts;
????????2
????DELETE----???????л????????е??
????DELETE FROM my_foods --my_foods????????????????
????WHERE??breakfast = 'bread';
????DELETE ?? SELECT ????DELETE?????????????????????????????????е??????ж??????
?????????DELETE???????????????????????е????????????????????л?????У?????WHERE???????????WHERE????е?????????????SELECT????÷???????LIKE??IN??BETWEEN????????????????????????????????????????RDBMS???????С?
???????????????е???????????????DELETE??INSERT????????????????????????????????????????????????????????????????????????????????
????SELECT *FROM my_foods
????WHERE breakfast = 'milk';
????INSERT  INTO my_foods
????VALUES('bread+milk');
????DELETE FROM my_foods
????WHERE breakfast = 'milk';
?????????????????????????????е??????????????????Σ?Ч??????UPDATE??????????????
????????3
????UPDATE---?????л????????е??????????WHERE???????е???????????????μ????
????UPDATE my_foods
????SET breakfast = 'bread'
?????????????μ???л?????У???ж????????WHERE??????
????UPDATE my_foods   ---?????μ??
????SET breakfast = 'bread'????????--?????? ??????
????WHERE breakfast = 'milk';????????--??λ
????...
?????????SET ??????????????????????????????????Щ??????????????????
????UPDATE my_foods
????SET foods_num = foods_num +1
????WHERE breakfast IN ('bread'??'milk');