MySQL Stored Procedures


  1. The IN, OUT and INOUT keywords do not apply to stored functions.











  1. 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.


  1. Which procedure parameter enables the caller to pass in a value and get back a value?











  1. 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.



  1. Which privilege must be given to the database to create a stored function or procedure?











  1. 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.


  1. How many values can be returned from a stored procedure?











  1. 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.