check whether all the emp numbers are indeed unique.

Answer Posted / santhi kandasamy

In Oracle,

select empno from emp where empno is not null
group by empno
having count(*) >1;

if the above query does not return any rows then you can
consider, empno having unique values.

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does sql*plus have a pl/sql engine?

753


How to run pl sql program in mysql?

681


How do I count rows in sql query?

688


What are the query optimization techniques?

711


what is a unique key ? : Sql dba

762






Can dml statements be used in pl/sql?

775


What is the difference between the repeatable read and serializable isolation levels? : Transact sql

743


What is procedure in pl sql?

721


Which tcp/ip port does sql server run on? How can it be changed? : Sql dba

655


what is heap table? : Sql dba

801


What are the different types of constraints?

742


What is the difference between subquery and correlated query?

724


What is having clause in sql?

714


What is sql table?

688


Why stored procedure is faster than query?

680