欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

SQL_去重,插入不同数据

程序员文章站 2023-11-23 15:20:46
sql_去重,插入不同数据   删除重复数据   delete from t_common_079_show_screen t where t....

sql_去重,插入不同数据

 

删除重复数据

 

delete from t_common_079_show_screen t where t.rowid in(select max(rowid) from t_common_079_show_screen group by screen_id having count(screen_id)>1);

 

 

插入不同数据

 

insert into "t_common_006_main_attach_copy" select distinct t.* from t_common_006_main_attach t;