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

Answers were Sorted based on User's Feedback



query to just fetch first matching row and stop execution. once one matching row is found ..no more..

Answer / romeu viegas

Select ...
FROM ...
WHERE ...
FETCH FIRST 1 ROW ONLY

Is This Answer Correct ?    3 Yes 1 No

query to just fetch first matching row and stop execution. once one matching row is found ..no more..

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

More DB2 Interview Questions

What do you do to keep the cursor from closing after a commit?

1 Answers  


Define predicate?

0 Answers  


Is it possible using max on a char column?

0 Answers  


What is DYNSLT keyword? How do you perform selection using DYNSLT

1 Answers  


If anyone has IBM Certification Dumps pls forward to me & also let me know what are the Certification Codes that are available in DB2

0 Answers  






Name the various locking levels available?

0 Answers  


DB2: A calls B once sucessfull and second time when it calls says curson is open why is it so?

1 Answers   IBM,


When do you specify the isolation level?

0 Answers  


how do you resolve -818 error in db2. where we have to see time stamp token. i said by seeing in load module and plan .is it correct or not. give clear explination for how to see time stamp token

2 Answers   IBM, TRD,


Q4. How will you get the count of record without using COUNT verb in query?

2 Answers   IBM,


What is the role of the data page in the db2 database?

0 Answers  


Mention some fields that are a part of sqlca.

0 Answers  


Categories