12 Sep 100 MySQL MCQ (Multiple Choice Questions) with Answers
Show Answer
2) Which SQL command is used to retrieve data from a MySQL database?
Show Answer
3) Which data type is used to store variable-length character strings in MySQL?
Show Answer
4) Which clause is used to filter rows based on a specified condition in a SELECT query?
Show Answer
5) What is the default port number for MySQL connections?
Show Answer
6) Which SQL keyword is used to remove duplicate rows from a result set?
Show Answer
7) Which command is used to add a new record into a MySQL table?
Show Answer
8) Which statement is used to modify existing records in a table?
Show Answer
9) Which command is used to delete all rows from a table without logging individual row deletions?
Show Answer
10) Which command permanently deletes a table structure along with all its data?
Show Answer
11) Which SQL constraint ensures that all values in a column are unique?
Show Answer
12) A PRIMARY KEY constraint automatically implies which combination of constraints?
Show Answer
13) How many PRIMARY KEY constraints can a single table have?
Show Answer
14) Which SQL clause is used to sort the result set in ascending or descending order?
Show Answer
15) What is the default sorting direction of the ORDER BY clause?
Show Answer
16) Which wildcard character represents zero, one, or multiple characters in a LIKE query?
Show Answer
17) Which wildcard character represents a single character in a LIKE query?
Show Answer
18) Which aggregate function returns the total number of rows matching a criteria?
Show Answer
19) Which operator is used to search for a specified pattern in a column?
Show Answer
20) Which clause is used to group rows that have the same values in specified columns?
Show Answer
21) Which clause is used to filter groups created by the GROUP BY clause?
Show Answer
22) Which function returns the current date and time in MySQL?
Show Answer
23) Which JOIN returns all records from the left table and matched records from the right table?
Show Answer
24) Which JOIN returns records that have matching values in both tables?
Show Answer
25) What type of JOIN produces a Cartesian product of two tables?
Show Answer
26) Which MySQL storage engine supports transactions and foreign keys by default?
Show Answer
27) Which SQL statement is used to create a new database?
Show Answer
28) Which statement is used to select a database to work with in MySQL?
Show Answer
29) Which statement shows all available databases in MySQL?
Show Answer
30) Which statement displays the structure of a table (columns, types, keys)?
Show Answer
31) Which command is used to add a new column to an existing table?
Show Answer
32) Which operator is used to test for NULL values in MySQL?
Show Answer
33) Which SQL function replaces NULL with a specified value?
Show Answer
34) What does the auto_increment attribute do in MySQL?
Show Answer
35) Which keyword is used to limit the number of rows returned by a query in MySQL?
Show Answer
36) In LIMIT 10, 5, what does 10 represent?
Show Answer
37) Which function is used to convert text to uppercase in MySQL?
Show Answer
38) Which function returns the length of a string in characters?
Show Answer
39) Which mathematical function returns the highest value from a column?
Show Answer
40) Which operator is used to filter values within an inclusive range?
Show Answer
41) Which operator allows specifying multiple discrete values in a WHERE clause?
Show Answer
42) What is the purpose of a Foreign Key in MySQL?
Show Answer
43) Which command grants privileges to MySQL users?
Show Answer
44) Which command removes privileges from a MySQL user?
Show Answer
45) Which privilege allows a user to create new tables and databases?
Show Answer
46) Which command saves all pending transaction changes to the database?
Show Answer
47) Which command undoes transaction changes made since the last commit?
Show Answer
48) Which MySQL log records all statements that change database data?
Show Answer
49) What does DDL stand for in database terminology?
Show Answer
50) Which of the following is a DML command?
Show Answer
51) Which of the following is a DDL command?
Show Answer
52) What is the result of SELECT 5 + NULL; in MySQL?
Show Answer
53) Which function removes leading and trailing spaces from a string?
Show Answer
54) Which index type is created automatically when a PRIMARY KEY is defined?
Show Answer
55) Which keyword is used to rename a column or table in a SELECT output?
Show Answer
56) Which function extracts the year part from a DATE or DATETIME expression?
Show Answer
57) How do you write a single-line comment in MySQL?
Show Answer
58) What is the purpose of the MySQL EXPLAIN keyword?
Show Answer
59) Which function is used to concatenate two or more strings together?
Show Answer
60) What is a View in MySQL?
Show Answer
61) Which command is used to create a view?
Show Answer
62) What is a Stored Procedure in MySQL?
Show Answer
63) Which SQL keyword is used to execute a Stored Procedure in MySQL?
Show Answer
64) What is a MySQL Trigger?
Show Answer
65) Which events can trigger a database trigger in MySQL?
Show Answer
66) What does the CHAR data type store?
Show Answer
67) What is the storage size of the TINYINT data type in bytes?
Show Answer
68) What is the maximum range of signed values for a TINYINT column?
Show Answer
69) Which data type is best suited for storing monetary values with exact precision?
Show Answer
70) What is the default string matching behavior in MySQL standard string queries?
Show Answer
71) Which operator is used for bitwise AND operations in MySQL?
Show Answer
72) Which condition tests if a subquery returns any rows?
Show Answer
73) Which set operator combines the results of two queries and removes duplicate rows?
Show Answer
74) What is the difference between UNION and UNION ALL?
Show Answer
75) Which function returns the current logged-in MySQL user and hostname?
Show Answer
76) Which command reloads the grant tables in MySQL?
Show Answer
77) Which clause is used to assign default values to a column if no value is provided?
Show Answer
78) What does ACID stand for in transaction processing?
Show Answer
79) Which engine storage type stores all data in RAM for fast access?
Show Answer
80) What command is used to delete a database in MySQL?
Show Answer
81) Which command is used to create an index on a table?
Show Answer
82) What is the main purpose of creating an index on a table?
Show Answer
83) Which function calculates the average value of a numeric column?
Show Answer
84) Which statement returns all records from a table named employees?
Show Answer
85) What does the ON DELETE CASCADE option mean for foreign keys?
Show Answer
86) Which function returns the current database name in use?
Show Answer
87) How do you write a multi-line comment in MySQL?
Show Answer
88) Which data type is best used for storing binary large objects like images or files?
Show Answer
89) What is the default date format in MySQL?
Show Answer
90) Which function is used to get the number of days between two dates?
Show Answer
91) What does the CHECK constraint do in MySQL?
Show Answer
92) Which character set is recommended in modern MySQL for full Unicode support (including emojis)?
Show Answer
93) Which statement is used to remove an index named idx_name from table_name?
Show Answer
94) Which clause limits query results based on aggregate calculations?
Show Answer
95) What is a subquery in MySQL?
Show Answer
96) Which command shows all active threads/queries running in MySQL?
Show Answer
97) Which clause is used to set savepoints inside a transaction?
Show Answer
98) Which MySQL system variable stores the auto-increment step value?
Show Answer
99) Which function returns the auto-generated ID from the last INSERT statement executed by the connection?
Show Answer
100) What does the COALESCE() function return?
Show Answer
No Comments