drop column birthday;
3.清空表中的数据(与delete from table_name区分开) truncate table emp2;
4.重命名表 rename emp2 to emp3;
5.删除表
drop table emp3;
数据处理 DML
1)增
1.1 增添一条记录
insert into [表名](,,,,,)
values(,,,,,)
1.2 从其它表中拷贝数据
insert into [表名]
select .... from [另一个表]
where ....
2)改
update [表名]
set .....
where ....
3)删
delete from [表名]
where ....
4)查(最常用的数据库操作)
select ....
from …
where ….
group by …
having …
order by ….
约 束
对创建的表的列属性、字段进行的限制。诸如:not null/unique/primary key/foreign key/check
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说教育文库常用sql操作总结_尚硅谷_宋红康(3)在线全文阅读。
相关推荐: