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 is spool?

0 Answers  


Is inner join same as self join?

0 Answers  


How do you exit in sql?

0 Answers  


What is difference between function and trigger?

0 Answers  


How to get each name only once from an employee table?

0 Answers  






what are the forced views

6 Answers   Hexaware, TCS,


What is trigger price?

0 Answers  


what are the type of locks ? : Sql dba

0 Answers  


how to escape special characters in sql statements? : Sql dba

0 Answers  


how to use case expression? : Sql dba

0 Answers  


how to create table with in the procedure or function?

2 Answers   Genpact, HCL,


What is Function based Index and which type of function we can use in Function base index. can we use aggregate,NVL function in Function based Index..

1 Answers   Metric Stream, Polaris,


Categories