Home » RDBMS Server » Server Administration » How can we Delete distinct field
How can we Delete distinct field [message #373627] Fri, 27 April 2001 10:29 Go to next message
randy
Messages: 25
Registered: November 2000
Junior Member
NAME SALARY

SMITH 1000
BEN 4500
SMITH 3000
DAVE 1500
JOHN 1000
MARIA 3000
JEFF 2500
JAIMY 6000
BOB 1000
MATT 1500
JEFF 1000
JAIMY 1500
RICH 1200
AAA 4500
DEF 4500

Answer....

JEFF 2500
JAIMY 6000
RICH 1200

How can we delete the records which has the same salary field, different other fields

Delete from tablename where sal in (1000,4500,3000,...) its works
But I have a lot of records

Thanks
Re: How can we Delete distinct field [message #373628 is a reply to message #373627] Fri, 27 April 2001 10:53 Go to previous message
Jaco
Messages: 23
Registered: August 2000
Junior Member
DELETE PROJ WHERE ROWID NOT IN (select max(rowid) from PROJ group by SAL having count(SAL) >=1);
Previous Topic: Page Number in Reports
Next Topic: Database Link Problem
Goto Forum:
  


Current Time: Tue Jul 02 17:43:14 CDT 2024