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 inbuilt functions in sql?
How many disk partitions should I have?
How do you optimize SQL queries ?
6 Answers CarrizalSoft Technologies, Infosys, Oracle,
query to retrive the employees whose sal is greater than avg sal
Can we create foreign key without primary key?
What is varchar data type in sql?
Can we use commit or rollback in trigger? If yes, then how. Please explain with a suitable example?
what is offset-fetch filter in tsql? : Transact sql
Differences between UNIQUE and DISTINCT in select statements
26 Answers ABS, DELL, Deloitte, Hewitt, Oracle, Verinon Technology Solutions, Wipro,
How to install oracle sql developer?
write a query to display diference between two dates in sql server
Explain character-manipulation functions?