Showing posts with label constraints. Show all posts
Showing posts with label constraints. Show all posts

Friday, March 30, 2012

remove duplicate rows

i have a table with NO constraints and duplicate rows(e.g one row is inserted four times) now I want to remove the rows in such a way that only one row from the duplicate rows should stay in the table. Is there any query to solve this problem.
**********************************************************************
Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...Here is your solution:
http://support.microsoft.com/default.aspx?scid=KB;en-us;q139444
"enoch jadhav" <enochjadhav@.myway.com> wrote in message
news:ejrKmIblDHA.424@.TK2MSFTNGP10.phx.gbl...
> i have a table with NO constraints and duplicate rows(e.g one row is
inserted four times) now I want to remove the rows in such a way that only
one row from the duplicate rows should stay in the table. Is there any query
to solve this problem.
> **********************************************************************
> Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
> Comprehensive, categorised, searchable collection of links to ASP &
ASP.NET resources...

Monday, March 26, 2012

Remove all constraints in a database

Hi Everyone..

I want to remove all the constraints from all the tables in a database. I'm using SQL Server 2000.

will you please help me.. Thanks in advance

with regards

Fraijo

Select the database in the object explorer of SQL Server Enterprise Manager, right click, select Tasks and then Generate Scripts. Generate a script with all tables specified. Get the constraint drops from within that script.

I am curious as to why you wish to do this.