兩種:
1.不刪除數據:
group by, 僅是對查詢出來的內容進行去重複的顯示
2. 刪除數據:
distinct 用法:select distinct 字段from
---------------------------------------------------------------------------------
rowid待研究
用rowid方法
據據oracle帶的rowid屬性,進行判斷,是否存在重複,語句如下:
查數據:
select * from table1 a where rowid !=(select max(rowid)
from table1 b where a.name1=b.name1 and a.name2=b.name2......)
刪數據:
delete from table1 a where rowid !=(select max(rowid)
from table1 b where a.name1=b.name1 and a.name2=b.name2......)