one of the column in my table contains the data like
SAL
----
1000
1000
2000
3000
3000
So my requirement is i want output like
SAL
---
1000
2000
3000
it mean i want to delete duplicate rows in the table
permanently and i want output in the above formatow should u
write query?
Answers were Sorted based on User's Feedback
Answer / dinesh kumar
delete from table_name alias1
where rownum < ( select max(rownum) from table_name alias2
where alias1.col1 = alias.col2 );
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / destiny
create table salary2 as select distinct * from salary1
drop table salary1
rename salary2 to salary1
| Is This Answer Correct ? | 0 Yes | 0 No |
What trigger means?
Is sql a scripting language?
How many primary keys can a table have?
What is the difference between UNIQUE KEY and UNIQUE INDEX?
How many joins in sql?
Explain unique key in sql.
how i do the database testing of online money transactions between two parties (client and organization). suppose our company makes a website for our client and give a extra feature of online money transaction with there clients then how i test this feature in database testing
What is the criteria while applying index to any column on any table.
what is difference between delete and truncate commands? : Sql dba
What is full form of rtm?
Hi all, i have a table as follows empid empname mgrid deptid 1 a 3 4 2 b 1 5 3 c 2 3 4 d 3 6 5 e 4 7 i want the output as empname mgrname a c b a c b d c e d
What is data profiling in sql?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)