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 difference between my sql and sql?

0 Answers  


what is an execution plan? When would you use it? How would you view the execution plan? : Sql dba

0 Answers  


Mention what problem one might face while writing log information to a data-base table in pl/sql?

0 Answers  


What do you mean by stored procedures?

0 Answers  


What is the difference between execution of triggers and stored procedures?

0 Answers  






Can we interchange parameters in procedure while calling

1 Answers   TCS,


What are character functions?

0 Answers  


Hello All, Could any well write a query for the following scenario. Account(table name) No Name Amount 1 ABCD 2000.00 2 DEFG -2000.00 3 GHIJ 3000.50 4 JKLM 4000.00 5 MNOP 6000.00 O/p Should be in this format No Name Credit Debit 1 ABCD 2000.00 0 2 DEFG 0 -2000.00 3 GHIJ 3000.50 4 JKLM 0 -4000.00 5 MNOP 6000.00 o could any one give appropriate query for this Thnks in Advance

5 Answers   Target,


What are the string functions in sql?

0 Answers  


What is sql*loader?

0 Answers  


how to shut down the server with 'mysqladmin'? : Sql dba

0 Answers  


While inserting/updating million of records into a database table, how do I came to know how many records has been inserted or updated successfully so far?

2 Answers   HSBC,


Categories