Top MySQL MCQs for UGC NET, SET, EMRS, KVS, ISRO, and Assistant Professor and other competitive exams...
1. Which of the following is true about MySQL?
A) MySQL is an open-source database management system
B) MySQL is a NoSQL database
C) MySQL does not support relational database features
D) MySQL is a proprietary database
Answer: A) MySQL is an open-source database management system
2. What is the default storage engine used by MySQL as of version 5.5?
A) MyISAM
B) InnoDB
C) HEAP
D) CSV
Answer: B) InnoDB
3. Which command is used to view all databases in MySQL?
A) SHOW DATABASES;
B) DISPLAY DATABASES;
C) LIST DATABASES;
D) VIEW DATABASES;
Answer: A) SHOW DATABASES;
4. Which data type is used to store large text data in MySQL?
A) VARCHAR
B) TEXT
C) INT
D) BLOB
Answer: B) TEXT
5. What is the function of the AUTO_INCREMENT
attribute in MySQL?
A) Automatically increases a column value when a new row is inserted
B) Decreases the column value after every insert
C) Assigns random values to the column
D) None of the above
Answer: A) Automatically increases a column value when a new row is inserted
6. What is the maximum number of columns a MySQL table can have?
A) 256
B) 512
C) 1024
D) 4096
Answer: C) 1024
7. Which MySQL clause is used to filter the records retrieved by a SELECT statement?
A) ORDER BY
B) WHERE
C) GROUP BY
D) HAVING
Answer: B) WHERE
8. What does the UNION
operator do in MySQL?
A) Merges two SELECT queries but removes duplicate rows
B) Merges two SELECT queries and retains duplicate rows
C) Joins two tables based on a common column
D) None of the above
Answer: A) Merges two SELECT queries but removes duplicate rows
9. Which of the following statements is true about indexing in MySQL?
A) Indexes slow down SELECT queries
B) Indexes improve query performance
C) Indexes are automatically created for all columns
D) Indexes can only be applied to primary keys
Answer: B) Indexes improve query performance
10. What will happen if you use the DELETE
statement without a WHERE clause?
A) It will delete only one record
B) It will delete all records in the table
C) It will throw an error
D) It will not affect the table
Answer: B) It will delete all records in the table
Comments
Post a Comment