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 |
what are the other commands to know the structure of table using mysql commands except explain command? : Sql dba
what are date and time data types in mysql? : Sql dba
What does fetching a cursor do?
Which is better trigger or stored procedure?
Why do we use sql constraints?
Is it possible to access the current value in a session before accessing next value?
How to use distinct and count in sql query? Explain
How to trace the errors in pl/sql block code?
What are the parameter modes supported by pl/sql?
Display the total debit counts, total credit counts, sum of total debits, sum of total credits from an employee's transaction table (a single table) containing the following columns. Transaction_number Transaction_amount Transaction_date Transaction_type --> tells if the amount is a credit or a debit. As the query alone is important, the table is left with specifying just the field's name. Pls help me with this query.
what eliminate duplicate without using roenum and not
How do I start sql profiler?
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)