自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

DB2刪除重復(fù)數(shù)據(jù)的實(shí)現(xiàn)

數(shù)據(jù)庫(kù)
 DB2刪除重復(fù)數(shù)據(jù)使我們經(jīng)常使用的操作,下面就教您DB2刪除重復(fù)數(shù)據(jù)的方法,希望可以對(duì)您學(xué)習(xí)DB2刪除重復(fù)數(shù)據(jù)方面有所幫助。

 [[153205]]

       DB2刪除重復(fù)數(shù)據(jù)使我們經(jīng)常使用的操作,下面就教您DB2刪除重復(fù)數(shù)據(jù)的方法,希望可以對(duì)您學(xué)習(xí)DB2刪除重復(fù)數(shù)據(jù)方面有所幫助。

  使用ROW_NUMBER 刪除重復(fù)數(shù)據(jù)

  假設(shè)表TAB中有a,b,c三列,可以使用下列語(yǔ)句刪除a,b,c都相同的重復(fù)行。

  以下是代碼片段:

 

  1. delete from (select * from (select a,b,c,row_number() over(partition by a,b,c order by a,b,c) as row_num from tab) as e where row_num >1) 

  如果數(shù)據(jù)量太大可以采用如下方法:

  以下是代碼片段: 

  1. Create table emp_profile_temp like emp_profile; 

  大數(shù)據(jù)量采用 LOAD FROM CURSUR

  以下是代碼片段:

  1. DECLARE mycursor CURSOR FOR SELECT distinct * FROM emp_profile; LOAD FROM mycursor OF CURSOR INSERT INTO emp_profile_temp; 

  以下是代碼片段:

  1. drop table emp_profile; rename table emp_profile_temp to emp_profile 

 

責(zé)任編輯:honglu 來(lái)源: 博客
相關(guān)推薦

2010-11-03 13:50:49

DB2刪除重復(fù)數(shù)據(jù)

2010-09-30 10:29:56

DB2刪除重復(fù)記錄

2010-11-03 15:49:32

DB2刪除表

2010-08-03 09:49:58

DB2恢復(fù)數(shù)據(jù)庫(kù)

2010-07-07 16:53:54

SQL Server重

2010-07-21 11:38:59

SQL Server重

2010-07-26 14:58:26

SQL Server刪

2010-11-04 14:39:44

DB2刪除數(shù)據(jù)

2010-11-03 11:49:15

刪除DB2數(shù)據(jù)

2010-07-26 09:55:55

SQL Server重

2010-11-03 16:32:10

DB2創(chuàng)建數(shù)據(jù)庫(kù)

2010-08-13 17:54:14

DB2 dart恢復(fù)數(shù)

2010-07-23 15:09:42

SQL Server刪

2011-04-13 13:05:14

重復(fù)數(shù)據(jù)刪除

2010-07-23 16:21:37

SQL Server重

2010-09-30 15:52:55

DB2循環(huán)查詢

2010-09-30 16:21:40

DB2隔離級(jí)別

2010-11-03 14:52:26

DB2列轉(zhuǎn)行

2010-08-11 09:14:33

DB2數(shù)據(jù)類(lèi)型

2011-04-13 13:13:09

重復(fù)數(shù)據(jù)刪除
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)