删除列:ALTER TABLE tb1_name DROP[COLUMN] col_name;
添加多列:ALTER TABLE tb1_name ADD[COLUMN] (col_name column_definition,...);
添加单列:ALTER TABLE tb!_name ADD[COLUMN] col_name column_definition [FIRST|AFTER col_name];
删除记录:DELETE FROM province WHERE id=3;
验证表中是否有相应的记录:SELECT * FROM province;
添加多列:ALTER TABLE tb1_name ADD[COLUMN] (col_name column_definition,...);
添加单列:ALTER TABLE tb!_name ADD[COLUMN] col_name column_definition [FIRST|AFTER col_name];
删除记录:DELETE FROM province WHERE id=3;
验证表中是否有相应的记录:SELECT * FROM province;
2017-09-20
最赞回答 / _dark
首先,纠正一下这个exisis应该是exists吧。用法:exists (sql 返回结果集为真) 用途:例:表AID NAME 1 A12 A23 A3表BID AID NAME1 1 B12 2 B2 3 2 B3表A和表B是1对多的关系 A.ID => B.AIDSELECT ID,NAME FROM A WHERE EXISTS (SELECT * FROM B WHERE A.ID=B.AID)执行结果为1 A12 A2(Tips:此命...
2017-09-19