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 |
Why is partition used in sql?
What is over () in sql?
Why select is used in sql?
what are integrity rules?
How do you assign Construct the where clause without concatenating Field,value pairs?
What are views in sql?
how do you tune the slow running queries in oracle db , explain the methodology
Why primary key is required?
What is cross join sql?
How to add a column ‘salary’ to a table employee_details?
Write an sql query to select all records from the table?
How does pl sql work?
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)