Eliminate sql server table duplicate rows
Scenario : company_list table content with duplicate rows , only want to keep one row .
Now , create table temp1 , column definition same with company_lis , then
1. SQL Server 2005 , right click upon table ,
2. on table column , right click and choose “Indexes/Keys”
3. choose Add , “Is Unique” -> Yes
4. Then "Ignore Duplicate Keys" -> Yes
5. Save the table , then issue the command insert into temp1 select * from company_list . You will get data with no duplication rows in temp1 table, now ,
Jan 30, 2008
Eliminate sql server table duplicate rows
張貼者: Brian 於 10:45
標籤: Sql Server
Subscribe to:
Post Comments (Atom)
0 意見:
Post a Comment