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 |
Can a array declared with an index be displayed(readable format) in spool?
Which isolation level provides maximum concurrency?
what is a plan and how do you refer the plan in the program?
What is null in db2?
How do run the JCL which has 25 steps by skipping the following steps 5, 10,15 and 25 without using COND statement
What is the COBOL picture clause of the following DB2 data types: DATE, TIME, TIMESTAMP?
cobol-db2 runjcl please?
Is the primary key a clustered index?
Write a query to retrive partial string.
What is the difference between SYNONYM and ALIAS?
How do I add a column in db2?
by using cursors , we can access particular records from the table based on some condition, i want to delete those selected records, how can we write a query for this in the program?