How will you select unique values from a list of records?
Answers were Sorted based on User's Feedback
Answer / os reddy
select distinct * from emp;
OR
select unique * from emp;
| Is This Answer Correct ? | 6 Yes | 0 No |
Answer / eshwer
by using min(rowid) or max(rowid). its like deleting duplicate values.
select columns from emp where rowid not in[in] (select maxrow(id) from emp group by columns);
| Is This Answer Correct ? | 0 Yes | 0 No |
How do I order by ascending in sql?
What is different between union and minus?
suppose we have values like 1 5 7 in a colum.Now we want numbers like(2 3 4 6) that exists between 1 5 7.How can we do this using sql query??
When is the explicit cursor used ?
I have 2 Databases. How can create a table in particular database? How can i know the list of tables presented each database?( in oracle 10g)
If a View on a single base table is manipulated will the changes be reflected on the base table?
Can dml statements be used in pl/sql?
What is the use of pl/sql table?
What is sql not null constraint?
Can cursors be part of a trigger body?
Can a commit statement be executed as part of a trigger?
what is 'mysqld'? : Sql dba
Oracle (3253)
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)