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 |
What are the contents of dclgen?
ther r 2 tables OTTABLE & SALTABLE, add the otamt from OTTABLE to empsal of SALTABLE if eid is matched else add the unmatched from OTTABLE to SALTABLE
What is QUIESCE?
Request to database but database is not available so what is was abend is raised?
Which component is used to execute the sql statements?
4. A DB2 application is bound with uncommitted Read isolation level.It issues a request that retrieves 20 rows out of 200000 in the table. Which of the following descrbes the rows that are locked as a result of this request? a. None of the rows are locked. B.The retrieved rows are locked. C.The last row of the result set is locked. D.The rows not previously updated by another application are locked.
What are the various locks available?
How to find primary key of a table in db2?
Give a brief description of db2 isolation levels?
What is the function of logging in the db2 database?
What is a DB2 bind?
I have two tables A and B. Both tables are connected with SSN number as foreign key. I want to retrieve a column data from B table. How will you write a query?