醉了,mysql的删除居然变得这么麻烦 delete from table where id in()
2015-01-07 10:01
639 查看
居然要加这么多层,还需要在里面加一个别名才可以。
删除标题重复的旧记录。
删除标题重复的旧记录。
delete from theTable where id in ( select id from ( select min(id) id from theTable group by title H***ING count(*)>1 ) ids ) ;
相关文章推荐
- mysql select *... where id in (select 字符串 from ... )查询结果问题?
- 解决 Select * from TableName where ID in (@ids) 问题
- mysql删除表中指定数据,delete from..where
- LINQ To Entities如何实现查询 select * from tableA where id in (1,2,3,4) ?
- LINQ中in的实现方法-LINQ To Entities如何实现查询 select * from tableA where id in (1,2,3,4)
- 有多少行? SELECT rows FROM sysindexes WHERE id = OBJECT_ID('table_name') AND indid < 2
- UCenter info: MySQL Query Error SQL:SELECT value FROM [Table]vars WHERE noteexists
- mysql中You can’t specify target table for update in FROM clause错误解决方法
- MySQL报错“ you can't specify the target table for ‘update’ in from clause”
- MySQL can’t specify target table for update in FROM clause
- MySQL 存储过程传参数实现where id in('40288c81494f088601494f92938d0002,40288c81494f088601494f92938d0012,')示例
- mysql中的一个特殊问题:You can’t specify target table ‘abc’ for update in FROM clause
- UCenter info: MySQL Query Error SQL:SELECT value FROM [Table]vars WHERE noteexists
- mysql中You can't specify target table for update in FROM clause错误
- you can't specify target table for update in from clause Mysql 报错
- sql Split函数(WHERE RouterID IN (SELECT Item FROM dbo.Split(@routerIds,',')))
- MySQL 存储过程传参数问题:实现 where id in(1,2,3,...)
- MySQL 存储过程传参数问题:实现 where id in(1,2,3,...)
- 如何删除表中所有数据。delete from tablename与Truncate Table tablename 区别
- MySQL 存储过程传参数问题:实现 where id in(1,2,3,...)