Home »
MCQs »
MariaDB MCQs
Which is the correct MariaDB query syntax to declare a variable having the type of a column from the table?
44. Which is the correct MariaDB query syntax to declare a variable having the type of a column from the table?
- DECLARE variable_name TYPE OF table_name.column_name;
- DECLARE variable_name IN table_name.column_name;
- DECLARE variable_name TYPE OF table_name.column_name FROM table_name;
- None of the above
Answer: A) DECLARE variable_name TYPE OF table_name.column_name;
Explanation:
The correct MariaDB query syntax to declare a variable having the type of a column from the table is:
Syntax:
DECLARE variable_name TYPE OF table_name.column_name;