SQL删除语句的应用

2026-04-19 17:13:19

1、一、只要bz字段不是NULL,就删除对应的、所有的sfzhm的记录

SQL删除语句的应用

2、二、删除重复记录,只保留ID最大的记录

delete from 表名 where id not in(select max(id) from 表名 group by sfzhm)

相关推荐
  • 阅读量:130
  • 阅读量:188
  • 阅读量:95
  • 阅读量:182
  • 阅读量:106
  • 猜你喜欢