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 are foreign keys?
What is copy book?
What is a DB2 access path?
Where besides the DB2 catalog is database object information stored by DB2?
How we create a tables in db2,what is the process/syntax to create a table with example plz?
What is isolation level in db2?
Suppose there are many duplicate records in a Db2 table. What is the query to retrive only duplicate records?
How to solve S0C7 abend with out using DISPlay in 10 mins?
How to resolve -407 sql code in DB2?
What are the contents of a DCLGEN?
What are union and union all?
what is consistency token