饿虎岗资源网 Design By www.oxmxm.com
改变列的数据类型
[sql]
ALTER TABLE visitor MODIFY nam VARCHAR(30);
追加新列
[sql]
ALTER TABLE visitor ADD age INT;
ALTER TABLE visitor ADD age INT FIRST;
ALTER TABLE visitor ADD age INT AFTER nam;
改变列的位置
[sql]
ALTER TABLE visitor MODIFY age INT AFTER nam;
改变列名 和 类型
[sql]
ALTER TABLE visitor CHANGE birth birthday DATE;
删除列
[sql]
ALTER TABLE visitor DROP age;
表的复制
[sql]
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;
表的删除
[sql]
DROP TABLE IF EXISTS customerG;
DROP TABLE customerG;
饿虎岗资源网 Design By www.oxmxm.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
饿虎岗资源网 Design By www.oxmxm.com