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 only how should u
write query?
Answer Posted / yaswanth
delete from employees where rowid NOT IN(select max(rowid) from employees GROUP BY salary)
| Is This Answer Correct ? | 7 Yes | 2 No |
Post New Answer View All Answers
What does truncate mean in sql?
What is the difference between delete and truncate commands?
What is crud stand for?
How much ram can sql express use?
What is rollback?
First round ------------------- - Procedure - Packages - Views - Virtual tables - Can we use dcl with in function? - Joins and few scenarios - Triggers and its type - Pragma, type and its functionality - How to create db link in oracle - Materialized view - How to find duplicate values from table? - Cursor and its functionality - Write a script to display friday and its date from a entire year. - Exception Handling Second round ------------------------ Gave a scenario like. Need to write a function to perform. When user try to change a password. It must not be last five password and a given password can be combination of characters, symbols, upper and lower case.
What is mdb stand for?
Explain the uses of a database trigger?
what are date and time data types? : Sql dba
What does an inner join do?
What is cte?
what is the use of double ampersand (&&) in sql queries?
What is schema in sql?
What is Collation Sensitivity ? What are the various type ?
What is the difference between sql and mysql?