When Can you be sure that a query will return only one row?

Answers were Sorted based on User's Feedback



When Can you be sure that a query will return only one row?..

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

When Can you be sure that a query will return only one row?..

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

When Can you be sure that a query will return only one row?..

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

When Can you be sure that a query will return only one row?..

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

Post New Answer

More DB2 Interview Questions

What is cobol db2?

0 Answers  


What is an asychronous write?

1 Answers  


What is correlation names?

1 Answers  


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

0 Answers  


List down the data types in the db2 database.

0 Answers  






Can we delete records from view?

0 Answers  


What is deadlock in db2?

0 Answers  


What are PACKAGES ?

3 Answers  


What is a composite index and how does it differ from a multiple index?

1 Answers  


What is meant by a unit of recovery?

1 Answers  


Is it mandatory to use DCLGEN? If not, why would you use it at all?

2 Answers  


Select empno, sal from emptbl where empno < 101.By this query can we fetch first 100 recs? where empno is primary key.It won't throw -811 error? if it wont,then what is use of cursor technique while fetching first 100 recs. Please need more clarification.

2 Answers  


Categories