SQL点滴积累3--detete 删除的目标表数据与其他表有关联关系
2013-08-15 11:43
796 查看
删除a表中与b表重复的数据
1)delete from a where exists (select * from b where ***)
2)delete from a from a inner join b on a.id=b.id where ***
1)delete from a where exists (select * from b where ***)
2)delete from a from a inner join b on a.id=b.id where ***
相关文章推荐
- 点滴积累【other】---存储过程删除所有表中的数据(sql)
- SQL语句 删除表user 中字段name 内容重复的记录,A表 ,B表 字段相同 有关联关系的表 对表两个表中的数据
- 点滴积累【JS】---JS小功能(操作Table--动态添加删除表格及数据)
- 删除sql计划 调用的目标发生了异常。 (mscorlib) 其他信息: 用户 'sa' 登录失败。
- sqlserver中多行所有数据重复,无法更新或删除问题,通常是在没有主键的情况下的表
- 如何使用LINQ to SQL插入、修改、删除数据
- sql删除重复数据
- 实战 SQL Server 2008 数据库误删除数据的恢复 (转载至dudu http://www.cnblogs.com/dudu/archive/2011/10/15/sql_server_recover_deleted_records.html)
- SQL 数据插入、删除 大数据
- LINQ to SQL 系列 如何使用LINQ to SQL插入、修改、删除数据[转]
- SQL中怎么删除2张表中有关联的数据信息
- mysql删除重复数据的sql
- T-SQL技术收集——删除重复数据
- SQL删除重复数据只保留一条
- oracle用sql语句误删除数据后恢复方法
- SQL删除完全重复数据
- sql删除表中某字段下为空的数据
- sql存储过程通过ID删除两表中的数据。
- SQL删除重复数据只保留一条
- T-SQL删除重复数据,保留一条