MySQL Stored Procedures
- The IN, OUT and INOUT keywords do not apply to stored functions.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
The IN, OUT and INOUT keywords do not apply to stored functions, triggers and events. Triggers and events do not have parameters at all. For the stored functions, all parameters are like IN parameters.
- Which procedure parameter enables the caller to pass in a value and get back a value?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
In an IN parameter, the caller passes a value into the procedure. An OUT parameter is exactly the opposite. The ‘INOUT’ parameter enables the caller to pass in a value and also to get back a value.
- Which privilege must be given to the database to create a stored function or procedure?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
The ‘CREATE ROUTINE’ privilege must be given for the database in order to create a stored function or procedure. Stored functions and procedures always belong to a particular database.
- How many values can be returned from a stored procedure?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
In MySQL, unlike the stored functions, the stored procedures cannot return values. They can be used to perform calculations or produce the result sets passed back to the clients.