sql sever数据库学习之-----数据更新与删除

来源:互联网 发布:罪夜之奔 知乎 编辑:程序博客网 时间:2024/05/14 22:54

--数据的更新,而且这个视为所有行的指定列修改

update StudentInfo set sName='溜溜‘

-指定某些行进行修改

update StudentInfo set sName='露露' 

where sName>1


--设置某列为空

update StudentInfo set sName=null


--数据的删除操作delete 表明 where ....,注意会出现号码的跳号问题,系统默认值不连续

delete StudentInfo where sid>=5

--还有一个清空表的功能truncate table +表名,注意外键存不能清空

0 0
原创粉丝点击