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...

query to just fetch first matching row and stop execution.
once one matching row is found ..no more records should be checked.. if the first record is matching.. the query must stop

Answer Posted / parthasarathi

select * from
(select * from emp a where rowid<(select max(rowid) from
emp b where a.empno=b.empno) x
where rownum=1

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is it possible to create an Instance in DB2 using DB2 Control Center ?

1150


Who uses db2?

1112


What type of database is db2?

1018


What does reorg do in db2?

1074


Which command is used to connect to a database in DB2 ? Give the Syntax.

1149


Explain about rct.

1130


Explain various types of locks in db2?

1204


What is scrollable cursor in db2?

1122


What action db2 takes when a program aborts in the middle of a transaction?

1193


File not opened because library is *PROD and debug is UPDPROD(*NO). ? what may be the reason? how to solve it..?

3008


How do I add a column to an existing table in db2?

1081


When do you specify the isolation level?

1071


What do you mean by cursor?

1030


How to find the number of rows in db2 tables?

1127


What is the difference between dbm cfg and db cfg file in db2 ?

1591