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 |
What is the purpose of the QUIESE Utility?
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?
Explain package in db2 and its advantages?
DB2 can implement a join in three ways using a merge join, a nested join or a hybrid join. Explain the differences?
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?
Mention data types used in db2 ?
What is the cascade rule and how does it relate to deletions made with a subselect?
What is a db2 schema?
What is a cursor and what is its function?
Can we install 2 different versions of Db2 on same mainframe?
What is ALTER ?
What is bind plan?