to delete a row in SQL

A query returned 2 rows for me. But both the rows are having the same values. I need to delete one row of that. For deleting i tried to update one field of one row so that i can delete one..but its giving out an error like ;

Key column information is insufficient or incorrect. Too many rows were affected by update.

So how can i delete one row of those two
cinibia_nidhinAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Guy Hengel [angelIII / a3]Connect With a Mentor Billing EngineerCommented:
you could do this:
SET ROWCOUNT 1
DELETE yourtable WHERE col1 = value1 AND col2=value2 ...

Open in new window

0
 
chapmandewCommented:
delete top(1) yourtable
where yourquerycriteria = 'something'
0
 
albuitraCommented:
in oracle you can do something like this
delete from TABLE
where CONDITIONS
AND rownum < 2
0
 
cinibia_nidhinAuthor Commented:
thanks
0
All Courses

From novice to tech pro — start learning today.