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 is buffrpool? Where we use it ?

2 Answers   Tesco,


what is the process of precompiler?

2 Answers  


What is database alias db2?

0 Answers  


What is the purpose of coding FETCH in a SQL SELECT query? Explain with an example in Detail?

4 Answers  


What are the three lock types?

2 Answers  


Mention the definition of cobol in varchar field.

0 Answers  


What is db2 optimizer?

0 Answers  


What does the sqlcode of -818 pertain to?

3 Answers  


What is rct?

0 Answers  


if one db2 pgm calls another db2 pgm. how many plans do we need. what r the steps involved..

4 Answers   IBM,


What is meant by repeatable read?

4 Answers  


What are the various locking levels available?

3 Answers  


Categories