SQL数据更新/删除

更新表中特定行:
update 表
set 属性0=新值0
属性1=新值1
……
where 筛选条件;/where 属性x in 子查询;
子查询=select 属性x from … where…

更新表中所有行:
当上述where筛选条件包括所有行/无where就能更新所有行

删除表中某列:
利用更新所有行的语句将属性更新为null

删除表中特定行:
delete from 表
where 筛选条件;

删除表中所有行:
当上述where筛选条件包括所有行/无where就能删除所有行

猜你喜欢

转载自blog.csdn.net/dc12499574/article/details/121183168