Sql中刪除同一行資料 根據某一列

時間 2022-08-02 23:00:05

1樓:匿名使用者

delete from tb

where id not in (

select b.id from

(select distinct first_value(id) over(partition by name) as id,name

from tb) b)

2樓:匿名使用者

delete tb

where id not in

(select min(id) id from tb group by name)

3樓:匿名使用者

這些人,竟然抄襲別人的答案.唉

delete tb

where id not in

(select min(id) id from tb group by name)

4樓:匿名使用者

delete from tb where id not in (select id from tb group by name);

5樓:匿名使用者

delete tb

where id in

(select min(id) from tb group by name)

oracle如何刪除一行資料,Oracle中如何刪除一條記錄?

delete from table1 where commit delete from tablename where colunmname commit pl sql dev的話有個簡單的方法 首先,用select.for update語句查出結果然後,開鎖,用和滑鼠選中你要刪除的一行 最後,選擇...

如何把SQL表中的第一行資料更新到第二行中

du瓶邪 create table tmp id int identity 1,1 firstbalance int,lastbalance int insert into tmp lastbalance values 1 insert into tmp lastbalance values 3 i...

vb刪除某一行哪裡錯了

listview1.items.remove listview1.items.itemi1 index 這句裡面 少了個左括號 應該是listview1.items.remove listview1.items.item i1 index 應該是listview1.items.remove list...