Q4. How will you get the count of record without using COUNT verb in query?
Answers were Sorted based on User's Feedback
What happens to the PLAN if index used by it is dropped?
Mention the location where the output received from explain statement is stored.
How do I import data from excel to db2?
Request to database but database is not available so what is was abend is raised?
what is sql abend code -801,-802?
What if we try to insert the base table through updatable view , but failed to give a column value which is defined as NOT NULL.
I have a subprogram B calling from mainprogram A.I have opened a cursor in A ,Can i fetch the same cursor in subprogram B , If yes , Please explain the reason?
SET is the ANSI standard for variable assignment, SELECT is not. SET can only assign one variable at a time, SELECT can make multiple assignments at once. If assigning from a query, SET can only assign a scalar value. If the query returns multiple values/rows then SET will raise an error. SELECT will assign one of the values to the variable and hide the fact that multiple values were returned (so you'd likely never know why something was going wrong elsewhere - have fun troubleshooting that one) When assigning from a query if there is no value returned then SET will assign NULL, where SELECT will not make the assignment at all (so the variable will not be changed from it's previous value) As far as speed differences - there are no direct differences between SET and SELECT. However SELECT's ability to make multiple assignments in one shot does give it a slight speed advantage over SET.
What is the physical storage length of time data type?
How to execute stored procedure in db2 command editor?
How do you leave the cursor open after issuing a COMMIT? (for DB2 2.3 or above only)
What is lock escalation?