0
0
SQLquery~5 mins

Parameters (IN, OUT, INOUT) in SQL - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does an IN parameter do in a SQL stored procedure?
An IN parameter allows you to pass a value into the stored procedure. It is used to provide input data that the procedure can use but cannot change.
Click to reveal answer
beginner
What is the purpose of an OUT parameter in SQL procedures?
An OUT parameter is used to return a value from the stored procedure back to the caller. It allows the procedure to send data out after processing.
Click to reveal answer
intermediate
Explain an INOUT parameter in SQL stored procedures.
An INOUT parameter acts as both input and output. It passes a value into the procedure and can also return a modified value back to the caller.
Click to reveal answer
beginner
Can an IN parameter be modified inside the stored procedure?
No, an IN parameter cannot be changed inside the procedure. It is read-only and only used to provide input values.
Click to reveal answer
intermediate
How do OUT and INOUT parameters differ in their usage?
OUT parameters only return values from the procedure and do not accept input. INOUT parameters accept input and can also return modified values.
Click to reveal answer
Which parameter type is used only to send data into a SQL stored procedure?
AOUT
BINOUT
CIN
DRETURN
What type of parameter allows a stored procedure to return a value back to the caller?
AOUT
BDECLARE
CINOUT
DIN
Which parameter type can both accept input and return output?
AVAR
BOUT
CIN
DINOUT
Can an IN parameter be changed inside the procedure?
AYes, always
BNo, it is read-only
COnly if declared as INOUT
DOnly in some SQL dialects
If you want to modify a value inside a procedure and send it back, which parameter type should you use?
AINOUT
BOUT
CIN
DCONST
Describe the differences between IN, OUT, and INOUT parameters in SQL stored procedures.
Think about how data flows in and out of the procedure.
You got /3 concepts.
    Explain why you might choose an INOUT parameter instead of separate IN and OUT parameters.
    Consider when input needs to be changed and sent back.
    You got /3 concepts.