How do you do the EXPLAIN of a dynamic SQL statement?

Answer Posted / swetha dasari

we could replace the unknown values with a "?"
eg:

select name

from database

where name = ?

Is This Answer Correct ?    3 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the default page size of buffer pools?

639


How can you validate Sql errors during cursor operation in db2 pgms and where do you code?

1698


i want to maintain uniqueness on pdf without make lf??????????

1624


Which component is responsible for processing sql statements and selecting access paths?

647


How to find the number of rows in db2 tables?

605






What is the syntax for seeing the columns and data types of a table in the db2 database?

571


How do I create a view in db2?

595


What is cursor stability in db2?

796


How does db2 sample database connect?

563


What are catalog tables in db2?

601


What is runstats db2?

576


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.

2141


Which components manage deadlocks in db2?

600


What is ibm db2 client?

512


What is alias in db2?

561