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 the purpose of the QUIESE Utility?

1 Answers  


Consider that a package is bound into 2 different collections and the PKLIST option specifies both the collections. If the collection id is not specified in the program while executing the SQL query, then when the DB2 system will search the package list, which collection will it pick up or will it give an error/abend?

1 Answers  


Explain package in db2 and its advantages?

0 Answers  


DB2 can implement a join in three ways using a merge join, a nested join or a hybrid join. Explain the differences?

0 Answers  


Can a primary key have null values? If we try to insert a null value in a primary key column, will it work or give an error code?

6 Answers  






Mention data types used in db2 ?

0 Answers  


What is the cascade rule and how does it relate to deletions made with a subselect?

1 Answers  


What is a db2 schema?

0 Answers  


What is a cursor and what is its function?

2 Answers  


Can we install 2 different versions of Db2 on same mainframe?

3 Answers  


What is ALTER ?

3 Answers  


What is bind plan?

0 Answers  


Categories