|
-
Sep 27th, 2000, 01:33 AM
#1
Thread Starter
Fanatic Member
I've got a table inside my database.
But, the table creates duplicates itself...
So, for 1 unique record will duplicates to 2 or 3 records.
My question is...
How can I delete the duplicates ??? Coz, when I try to delete, even just 1 records of them, all of the same records will be deleted automatically.
Could anybody help ???
For your information, I'm using SQL Server ver. 7.0
Cheers,
Wen Lie
-
Sep 27th, 2000, 01:47 AM
#2
Lively Member
to be honest I'm not entirely sure of how to do this with sql server, but this is the theory:
form a new table based on selecting the distinct rows from the table
something like
create table2 as (
select distinct *
from table1);
I've never used sql server before so i am not sure of the syntax, but something similar must be possible. Sorry I can't give you working code.
It begs the question though, why is there no primary key?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|