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 |
1. what if null values retrived from database and no null indicator mentioned in query. What is sql code.
what is SPUFI ?
Can we update view in db2?
Why cursor is used in db2?
What is correlated subquery?
What is concurrency in db2?
Return code 100 means?
i have one file having 100 of records? i want to display it like 20 records in one column and 20 records in another column total 40 records per page ? how ?
What is an instance database?
What is the difference between Primary key and unique index?
How many types of page locks can be held in db2?
WHAT IS MEANT BY COMMIT COMMAND?