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 |
explain about index with examples
Can we use group-by clause in sub-query? If 'yes' means,Will it be executed successfully or else If 'no' means why should we not using that method? Give me your suggestion please....
What is a cursor in programming?
How to find the maximum value in a column in the db2 database?
Explain the function done by data manager?
how 2 resolve the -311 sqlcode
How can the duplicate values be eliminated from db2 select?
What is deadlock?
when we are tying to update a table having 100 rows. if the program abends when updating 51 row . how to start updating again from the 51 row .what was the logic
What is a PLAN table? How will you use it? Give the various fields of PLAN table?
A Table feild is declared as Decimal(7,2). I want to insert the decimal in to this column thru cobol-db2 program. How should I declare my local input file variable or any suggestion?
What is DYNSLT keyword? How do you perform selection using DYNSLT