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 |
Explain the PL/SQL compilation process.
Give an example of Full Outer Join?
Is left join same as join?
what is the command for user data type?
What is a common use of group by in sql?
Does truncate remove indexes?
How do I truncate a word?
what is autonomouse transaction?
Can you join views in sql?
What is nvl function?
what is explain plan?
what is cursor procedure
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)