How will you select unique values from a list of records?

Answers were Sorted based on User's Feedback



How will you select unique values from a list of records?..

Answer / suma

select distinct(emp_name) from employees;

Is This Answer Correct ?    27 Yes 0 No

How will you select unique values from a list of records?..

Answer / os reddy

select distinct * from emp;

OR

select unique * from emp;

Is This Answer Correct ?    6 Yes 0 No

How will you select unique values from a list of records?..

Answer / prasi

select distinct(names) from employees;

Is This Answer Correct ?    3 Yes 0 No

How will you select unique values from a list of records?..

Answer / klkl

correct
select distinct(emp_name) from employees;

Is This Answer Correct ?    3 Yes 1 No

How will you select unique values from a list of records?..

Answer / rakesh

select distinct * from emp;

Is This Answer Correct ?    2 Yes 1 No

How will you select unique values from a list of records?..

Answer / dinesh kumar

select distinct * from table_name;

Is This Answer Correct ?    0 Yes 0 No

How will you select unique values from a list of records?..

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

Post New Answer

More SQL PLSQL Interview Questions

What are inbuilt functions in sql?

0 Answers  


How many disk partitions should I have?

0 Answers  


How do you optimize SQL queries ?

6 Answers   CarrizalSoft Technologies, Infosys, Oracle,


query to retrive the employees whose sal is greater than avg sal

10 Answers   TCS,


Can we create foreign key without primary key?

0 Answers  






What is varchar data type in sql?

0 Answers  


Can we use commit or rollback in trigger? If yes, then how. Please explain with a suitable example?

5 Answers   HSBC,


what is offset-fetch filter in tsql? : Transact sql

0 Answers  


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?

0 Answers  


write a query to display diference between two dates in sql server

2 Answers  


Explain character-manipulation functions?

0 Answers  


Categories