SQL的批量删除

mac2022-06-30  65

在SQL中

a是A表的一列,存在a=1的数据

1.Delete from A where exists (Select 1 where a=1) 

2.Delete from A where exists (Select 1 from A where a=1)

结果 1:只删除a=1一条数据,2:删除所有数据。

转载于:https://www.cnblogs.com/pxd0925/archive/2011/08/15/2139579.html

最新回复(0)