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 |
If the main program has only cobol statements and subprogram has the db2 statements what is the procedure for precompilation. for which program we need to do the precompilation
Why do chiropractors use drop table?
What is the SQL query to select, delete and get count of duplicate rows in DB2?
what is a plan and how do you refer the plan in the program?
What are foreign keys?
How do you insert a record with a nullable column?
What are concurrency issues?
What os does db2 run on?
What if we try to insert the base table through updatable view , but failed to give a column value which is defined as NOT NULL.
What is db2 bind process?
What is a dbrm in db2?
how to resolve -805 . how to see dbrm and package not found