Assuming this query returns no results, what will be the contents of the variable pop?

Consider the following query, which is executed within a stored routine:

SELECT Population INTO pop FROM Country WHERE Region =

Assuming this query returns no results, what will be the contents of the variable pop?
Will warnings or errors be issued?

Consider the following query, which is executed within a stored routine:

SELECT Population INTO pop FROM Country WHERE Region =

Assuming this query returns no results, what will be the contents of the variable pop?
Will warnings or errors be issued?

A.
pop will be set to NULL

B.
pop will remain unchanged

C.
pop will be set to the DEFAULT value of it’s declaration

D.
An error will be issued

E.
A warning will be issued

F.
No warning or error will be issued

Explanation:
SET..INTO can assign values to routine parameters p292. If SELECT is empty, no info to input into local variable.



Leave a Reply 1

Your email address will not be published. Required fields are marked *