Vidyalelo
MySQL · Q801

MySQL

Programming · MySQL · question 801

Q801

Which statement can be used to specify the sql_mode system variable at runtime?

A.
SPECIFY
B.
SET
Answer
C.
ASSIGN
D.
CHANGE

Answer: Option B

Solution

Answer: Option B
Solution:
This question asks about how to change a special setting in MySQL called sql_mode. Think of sql_mode like a set of rules that MySQL follows when you run your SQL commands.

Out of the options given, only SET is used to change settings like sql_mode at the time you're using MySQL.

So the answer is Option B: SET

Here's a simple example of how to use SET to change sql_mode:
```sql SET sql_mode = 'STRICT_TRANS_TABLES'; ```
This line tells MySQL to use a strict set of rules for data types and transactions.