Vidyalelo
MySQL · Q1071

MySQL

Programming · MySQL · question 1071

Q1071

When no modes are enabled, what does this SQL statement return? SELECT @@SESSION.sql_mode;

A.
empty value
Answer
B.
zero
C.
a negative value
D.
a garbage value

Answer: Option A

Solution

Answer: Option A
Solution:
This question is about SQL modes in MySQL. SQL modes are settings that control how MySQL interprets and executes SQL statements.
The code SELECT @@SESSION.sql_mode; is used to check the current SQL mode set for the current session.
If no modes are enabled, it means that the default SQL mode is being used.
In the default mode, the statement SELECT @@SESSION.sql_mode; will return an empty value.
Therefore, the correct answer is Option A: empty value.