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 will you select unique values from a list of records?
What is difference between sql and mysql?
What is materialised View?
suppose we have a table in which 200 rows. i want to find 101 row ? what the query.... and how we find 4th and 5th highest salary and 1 to 10 highest salary
what is the bond code in materialized view?
What is the main difference between a UNION statement and a UNION ALL statement? 1. A UNION statement eliminates duplicate rows; a UNION ALL statement includes duplicate rows. 2. A UNION statement can be used to combine any number of queries; a UNION ALL statement can be used to combine a maximum of two queries. 3. A UNION statement can only combine queries that have parallel fields in the SELECT list; a UNION ALL statement can combine queries with differing SELECT list structures. 4. A UNION statement cannot be used with aggregate functions; a UNION ALL statement can be used with aggregate functions. 5. There is no difference between the two statements; they are interchangeable.
display null value rows with out using null function?
Types of optimization?
when a procedure /package is getting invalidated?
How consistent is the view of the data between and within multiple sessions, transactions or statements ?
What does 0 mean in sql?
Can we want to pass a parameter payroll_id to this external pl/sql function, how do we do it?
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)