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
Answer / romeu viegas
Select ...
FROM ...
WHERE ...
FETCH FIRST 1 ROW ONLY
Is This Answer Correct ? | 3 Yes | 1 No |
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 |
What is buffrpool? Where we use it ?
what is the process of precompiler?
What is database alias db2?
What is the purpose of coding FETCH in a SQL SELECT query? Explain with an example in Detail?
What are the three lock types?
Mention the definition of cobol in varchar field.
What is db2 optimizer?
What does the sqlcode of -818 pertain to?
What is rct?
if one db2 pgm calls another db2 pgm. how many plans do we need. what r the steps involved..
What is meant by repeatable read?
What are the various locking levels available?