Examveda

Which of these is a read only variable?

A. error_count

B. big_tables

C. autocommit

D. foreign_key_checks

Answer: Option A

Solution (By Examveda Team)

This question asks about variables in MySQL, which are like special settings that control how MySQL behaves. We're looking for a variable that's read-only, meaning you can only see its value, you can't change it.
Let's break down the options:
Option A: error_count - This variable keeps track of how many errors MySQL has encountered. You can't change the number of errors, so this is a read-only variable.
Option B: big_tables - This variable is used for optimizing large tables, and its value can be changed.
Option C: autocommit - This variable controls whether changes are automatically saved (committed) after each query. You can change this setting.
Option D: foreign_key_checks - This variable controls whether MySQL checks for foreign key constraints (rules about how data is linked between tables). You can change this setting.
So, the answer is Option A: error_count.
This is because the number of errors is determined by the MySQL server itself, and you can't manually set it.

This Question Belongs to MySQL >> MySQL Miscellaneous

Join The Discussion

Related Questions on MySQL Miscellaneous