_覓 | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁 |
FrontPage › 譴覲給一危一蠍
|
|
[edit]
1 DELETE覓 #-- 企 CREATE TABLE MEMBER( IDX int identity(1,1) , NAME Char(20) ) GO -- 一危 INSERT INTO MEMBER VALUES('A') INSERT INTO MEMBER VALUES('A') INSERT INTO MEMBER VALUES('B') INSERT INTO MEMBER VALUES('B') INSERT INTO MEMBER VALUES('B') INSERT INTO MEMBER VALUES('B') INSERT INTO MEMBER VALUES('C') INSERT INTO MEMBER VALUES('C') GO --2000危 覯 DELETE FROM MEMBER WHERE IDX IN ( SELECT A.IDX as IDX FROM MEMBER A INNER JOIN ( SELECT MAX(IDX) AS IDX , NAME AS NAME , COUNT(*) AS CNT FROM MEMBER GROUP BY NAME HAVING COUNT(*) >1) B ON A.NAME = B.NAME AND A.IDX!=B.IDX ) --2005伎 覯( 襭覲企 觜朱 豌襴 ) DELETE A FROM ( SELECT IDX , NAME , ROW_NUMBER() OVER(PARTITION BY NAME ORDER BY IDX) NUM FROM MEMBER ) A WHERE NUM <> 1
鏤
|
蟲郁蟆 蠏碁 豕螻 襦 襷れ 譯朱 蟆 蠏碁Μ 殊 . ( 企狩) |