When Can you be sure that a query will return only one row?
Answers were Sorted based on User's Feedback
Answer / shailendra
when you will retrive the record on the basis of primary key
for the perticuler record.
as like
select * from table_name where acct_no =2345678754332
the above given answeris also right
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / s
A Matching Index scan with equal predicate on a Unique
index will return only one row.
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / shankar
When you use CURSORS in your program.
or
when you use FETCH FIRST (n) ROW ONLY option on your SELECT
statement.
| Is This Answer Correct ? | 1 Yes | 2 No |
Answer / shekhar
when u use column function without using group by clause. it will give only single value. PLz correct if i m wrong.
| Is This Answer Correct ? | 0 Yes | 2 No |
in the CURSOR declare statement, if i am using an where clause and trying to compare the value with a host-varialble. EXEC SQL DECLARE C1 CURSOR FOR SELECT DEPTNO, DEPTNAME, MGRNO FROM DEPARTMENT WHERE ADMRDEPT = :ADM-DEPT Where would i need to provide value to this host-variable in the where clause. how could i pass value to this host-variable to check it.
What is db2 plan table?
What are the 4 environments which can access DB2 ?
What is the error code -803 ?
What is REORG? When is it used?
What is an inner join, and an outer join ?
What is the result of open cursor statement?
What are the various locking levels available?
What are foreign keys?
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
In a DB2-CICS program which is acts as co-ordinator and which is participant?
Suppose the outcome of executing a query results in a row having null. Based on the answer how you use it? Its declaration and inclusion?