一些SQL语句
时间:2010-10-22 来源:NerverQuit
SELECT * FROM tableName WHERE source = (SELECT MIN(source) FROM tableName)
2、复制表(源表名:a 新表名:b)
只复制表结构:select * into b from results where 1=0
复制结构+数据:select * into b from results where 1=1
3、删除表中重复的记录
delete from tablename
where id not in ( select max(id) from tablename group by column1,column2)
相关阅读 更多 +
排行榜 更多 +