SQL语句分享[不定期更新]时间:2023-03-10 01:57:39 查询临时表 if object_id('')>0 查询表中的数据 select 'insert into ta1(col1,col2,col3) values('''+ltrim(列1)+''',''''+ltrim(列2)+''','''+ltrim(列3)+''')' from ta2 删除重复的数据 delete t_news where id not in( select min(id) from t_news group by title) 待更新