Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


check whether all the emp numbers are indeed unique.

Answers were Sorted based on User's Feedback



check whether all the emp numbers are indeed unique...

Answer / nagendra

select empno, count(empno)
from emp
group by empno
having count(empno) > 1;

Is This Answer Correct ?    22 Yes 4 No

check whether all the emp numbers are indeed unique...

Answer / 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

check whether all the emp numbers are indeed unique...

Answer / eswar

select empno,count(empno)
from emp group by empno having count(empno)>1;

Is This Answer Correct ?    1 Yes 0 No

check whether all the emp numbers are indeed unique...

Answer / suresh somayajula

in rownum we will use < or <= operators only.

If any one knows this query pls send the answer.

Is This Answer Correct ?    0 Yes 1 No

check whether all the emp numbers are indeed unique...

Answer / biswajit rout

SELECT empno,count(*) FROM emp GROUP BY empno;

Is This Answer Correct ?    0 Yes 1 No

check whether all the emp numbers are indeed unique...

Answer / valli

select rowid from (
select emp_no, rownum() over (emp_no) as Rownum
from emp order_by emp_no,sal
) where rownum > 2

If this query returns no rows then we can say all the emp
numbers are indeed unique.

Regard,
Valli

Is This Answer Correct ?    0 Yes 5 No

Post New Answer

More SQL PLSQL Interview Questions

How do you assign Construct the where clause without concatenating Field,value pairs?

1 Answers   Microsoft,


How to display the contents of a current record fetched in a reference cursor?

2 Answers  


Can you call pl/sql package functions from within a fast formula?

0 Answers  


What is rank () in sql?

0 Answers  


I Have A Table Like This. Cityno Cityname Mails 1 Bangalore 8km 2 Hsr Layout 20km 3 Mejistic 30km 4 Jayadeva 55km 5 Itpl 80km 6 Hebbal 115km I Have Data Like This I Want O/p Like This Distance No.ofcity 0-50km 3 51-100km 2 101-150km 4 And So On

6 Answers   DELL, HCL, Oracle,


What is a unique constraint?

0 Answers  


What is the difference between instead of trigger and after trigger?

0 Answers  


What is dense_rank?

0 Answers  


what are the advantages of cursors than procedures?

2 Answers  


how would you enter characters as hex numbers? : Sql dba

0 Answers  


How do I edit a stored procedure?

0 Answers  


What is the difference between joins?

0 Answers  


Categories