drop database if exists 數(shù)據(jù)庫名;如果有指定數(shù)據(jù)庫名,則刪除
drop table if exists 表名;如果有指定表名,則刪除
drop database 數(shù)據(jù)庫名;刪除數(shù)據(jù)庫
truncate tablename;快速刪除表中數(shù)據(jù),不可恢復(fù);id自增長從開始自增長
delete from 表名;刪除表中所有數(shù)據(jù),id自增長沿著刪除前繼續(xù)
alter table 表名 drop 字段;刪除列,就是刪除指定字段
drop table tablename;刪除表
alter table 表名 modify id int unsigned;刪除自增長
alter table 表名 drop primary key;刪除主鍵
alter table 表名 alter 字段名 drop default;刪除指定表中的指定字段的默認(rèn)值