Examveda

How many options can be used to control LOCAL capability at runtime?

A. 0

B. 1

C. 2

D. 3

Answer: Option C

Solution (By Examveda Team)

This question is about LOCAL capability in MySQL. LOCAL capability allows you to use certain features within a single connection. Think of it like a special permission that only applies to your current session with the database.

The question asks how many ways you can control this LOCAL capability while your MySQL session is running.

The correct answer is Option C: 2.

Here's why:
1. SESSION VARIABLES: You can change the value of a SESSION variable to affect LOCAL capability. Think of SESSION variables as settings specific to your current connection. For example, changing the `sql_mode` variable can adjust what types of SQL statements are allowed.
2. SET [LOCAL] ... You can use the `SET [LOCAL]` statement. This allows you to directly set a SESSION variable within your current session. For example, `SET [LOCAL] sql_mode = 'STRICT_TRANS_TABLES';` would set the `sql_mode` variable for your current connection.

So, there are two ways to control LOCAL capability at runtime: by changing SESSION variables and by using the `SET [LOCAL]` statement.

This Question Belongs to MySQL >> MySQL Miscellaneous

Join The Discussion

Related Questions on MySQL Miscellaneous