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

Can we use pl sql in mysql?

0 Answers  


what is oltp (online transaction processing)? : Sql dba

0 Answers  


how would concatenate strings in mysql? : Sql dba

0 Answers  


Why cross join is used?

0 Answers  


What is multiple columns?

0 Answers  






What will you get by the cursor attribute sql%found?

0 Answers  


What is before trigger?

0 Answers  


Is a foreign key always unique?

0 Answers  


how to get help information from the server? : Sql dba

0 Answers  


I have a table with 1 million records out of which 10,000 records are of unique records, then if I will implement index, then which type of index shall I use and why shall I use?

2 Answers   HSBC,


How many types of triggers exist in pl/sql?

0 Answers  


What is cursor and its types?

0 Answers  


Categories