What is the difference between IN subselects and EXISTS
subselect?
Answer Posted / s
IN subselect will return rows that match the values in the
IN list. EXISTS will return rows if the subselect return a
true value.
| Is This Answer Correct ? | 11 Yes | 2 No |
Post New Answer View All Answers
Explain package in db2 and its advantages?
What is the physical storage length of the data types: date, time, timestamp in the db2 database?
What is host variable in db2 cobol?
On which levels locks can be applied?
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.
Can one database have multiple instances?
Mention the definition of cobol in varchar field.
what is the sqlcode -501
If the cursor is kept open followed the issuing of commit, what is the procedure to leave the cursor that way?
How do you eliminate duplicate values in db2?
Is db2 relational database?
In an sql table that is embedded, what is the procedure to retrieve rows that are part of a db2 table?
How do I connect my db2 database to ibm?
How to execute stored procedures?
What is the use of commit in db2?