Home » SQL & PL/SQL » SQL & PL/SQL » how I can delete a row
icon5.gif  how I can delete a row [message #200718] Wed, 01 November 2006 01:21 Go to next message
srinivaschowdary
Messages: 1
Registered: November 2006
Location: kadapa
Junior Member

hi,
suppose we have a table emp with out primary key. in the table we have 5 rows like
empno empname salary
110 seenu 10000
110 seenu 10000
113 sasi 40000
115 sai 50000
120 mouli 60000


then i want delete first row how i can delete that?

[Updated on: Wed, 01 November 2006 01:27]

Report message to a moderator

Re: how I can delete a row [message #200736 is a reply to message #200718] Wed, 01 November 2006 02:13 Go to previous messageGo to next message
michael_bialik
Messages: 611
Registered: July 2006
Senior Member
Search on net for "delete duplicate rows"
Re: how I can delete a row [message #200746 is a reply to message #200736] Wed, 01 November 2006 02:52 Go to previous messageGo to next message
Littlefoot
Messages: 20895
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Reported message
Reported By: srinivaschowdary On: Wed, 01 November 2006 08:26 In: SQL & PL/SQL SQL Experts how I can delete a row

Do not report your own message (unless it is really a nasty one Wink); only moderators and administrators see the report, but that's NOT a guarantee that you'll get your answer any faster than usual.
Re: how I can delete a row [message #200805 is a reply to message #200718] Wed, 01 November 2006 07:15 Go to previous messageGo to next message
white
Messages: 13
Registered: October 2006
Junior Member


hi,
if u want to delete the first row then
this is the query.

sql>delete from emp where rowid in(select min(rowid) from emp group by empno);
Re: how I can delete a row [message #200808 is a reply to message #200718] Wed, 01 November 2006 07:24 Go to previous message
white
Messages: 13
Registered: October 2006
Junior Member



please do modify the query that


sql>delete from emp where rowid not in(select min(rowid) from emp group by empno);
Previous Topic: How specify more than 1000 values in IN operator
Next Topic: unable to update table
Goto Forum:
  


Current Time: Mon Dec 05 21:20:40 CST 2016

Total time taken to generate the page: 0.10555 seconds