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 temporal table in db2?
What is Reorg Recovery? when will you run it?
What is correlation names?
What is the maximum length of sqlca?
What is bufferpool in db2?
Where is the access path logic created by the DB2 Optimizer stored?
I have a table which has thousand of records i want to fetch only record num 100 to record num 200. Write a query that satisfies this criteria.(Cant use any keys) Anyone please reply ASAP!
17 Answers KNIT, Tech Mahindra,
What is the purpose of coding FETCH in a SQL SELECT query? Explain with an example in Detail?
Which command is used to connect to a database in DB2 ? Give the Syntax.
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?
What is tablespace?
What is the SQL Communications Area and what are some of its key fields?