日期:2014-05-16 浏览次数:20341 次
ALTER TABLE visitor MODIFY nam VARCHAR(30);
追加新列
ALTER TABLE visitor ADD age INT; ALTER TABLE visitor ADD age INT FIRST; ALTER TABLE visitor ADD age INT AFTER nam;
ALTER TABLE visitor MODIFY age INT AFTER nam;
ALTER TABLE visitor CHANGE birth birthday DATE;
删除列
ALTER TABLE visitor DROP age;
CREATE TABLE customerH SELECT * FROM customer; CREATE TABLE customerG LIKE customer; INSERT INTO customerG SELECT * FROM customer; INSERT INTO tb1G(no) SELECT bang FROM tb1;
DROP TABLE IF EXISTS customerG; DROP TABLE customerG;