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?
Answer Posted / guest
SQL> DELETE FROM <TABLE_NAME>
WHERE (ROWID,SAL) NOT IN
(SELECT MIN(ROWID),SAL FROM <TABLE_NAME>
GROUP BY SAL);
Is This Answer Correct ? | 13 Yes | 5 No |
Post New Answer View All Answers
What is the difference between python and sql?
How many types of index are there?
Explain the difference between drop and truncate commands in sql?
what does the t-sql command ident_incr does? : Transact sql
What are the different sql languages?
Write the order of precedence for validation of a column in a table? I. Done using database triggers. Ii. Done using integarity constraints
What is the use of triggers?
what is an execution plan? When would you use it? How would you view the execution plan? : Sql dba
Can a composite key be null?
How do you explain an index?
what is cursor. write example of it. What are the attributes of cursor.
Which software is used for pl sql programming?
How do we accept inputs from user during runtime?
what is the difference between sql and t-sql? : Transact sql
What is dba in sql? : SQL DBA