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 the contention situations caused by locks?
wht is d/f b/w inner join and outer join ? d/f group by and order by having by ?
i want to know how the commit option works,how it save the changes? it will update the database or what ? where we can see these saved changes?
Explain the EXPLAIN statement?
what is + sign and -ve sign for sql code ?
What is runstats and reorg in db2?
How do I delete a table in database?
Can a Db2 table data be retrived through JCL?
If I have a view which is a join of two or more tables, can this view be updateable?
what is the steps followed in EXPLAIN Process or EXPLAIN command. (Explain is for identifying the optimized access path but how or what is the steps for doing the EXPLAIN)
If the base table underlying a view is restructured, eg. attributes are added, does the application code accessing the view need to be redone?
What happens to a tablespace when its recovery infromation has been removed and a full recovery is no longer possible?