Edu
Hub
Courses
AI Tools
Leaderboard
Login/Register
AR
Abdullah Rashid
abdullah@example.com
Navigation
📚
Courses
🏆
Leaderboard
✨
AI Tools
←
MySQL Mastery: Medium Level
⏱
15:00
Quit
0 / 20 answered
0%
MySQL Mastery: Medium Level
10 questions · Medium difficulty · 00:20:00 min
🔥 In Progress
Question 1
Which SQL clause is used to filter rows after aggregation in a GROUP BY query?
FILTER
HAVING
ORDER BY
WHERE
Question 2
What is the purpose of the EXPLAIN statement in MySQL?
To explain the syntax of a query
To display the execution plan of a query
To create an index
To execute a query and show results
Question 3
Which join returns all rows when there is a match in one of the tables?
FULL OUTER JOIN
INNER JOIN
RIGHT JOIN
LEFT JOIN
Question 4
Which of the following is used to avoid duplicate rows in a SELECT result?
EXCLUSIVE
DIFFERENT
UNIQUE
DISTINCT
Question 5
What does the following SQL do? CREATE INDEX idx_name ON table (column);
Creates a foreign key
Creates a primary key
Creates a unique constraint
Creates an index for faster searches
Question 6
Which of the following is the correct order of clauses in a SELECT statement?
FROM, SELECT, WHERE, GROUP BY, HAVING, ORDER BY
SELECT, FROM, GROUP BY, WHERE, HAVING, ORDER BY
SELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY
SELECT, FROM, WHERE, HAVING, GROUP BY, ORDER BY
Question 7
What is the default storage engine in MySQL (as of version 8.0)?
MyISAM
Memory
Archive
InnoDB
Question 8
Which SQL function returns the number of characters in a string?
LENGTH()
CHAR_LENGTH()
SIZE()
COUNT()
Question 9
What is the difference between CHAR and VARCHAR data types?
CHAR is variable-length, VARCHAR is fixed-length
CHAR is fixed-length, VARCHAR is variable-length
Both are variable-length
Both are fixed-length
Question 10
Which of the following is used to add a new column to an existing table?
UPDATE TABLE ... ADD COLUMN
INSERT TABLE ... ADD COLUMN
MODIFY TABLE ... ADD COLUMN
ALTER TABLE ... ADD COLUMN
Question 11
What does the following query return? SELECT COUNT(*) FROM table;
Number of non-null values in all columns
Total number of rows in the table
Average of all values
Sum of all values in the table
Question 12
Which of the following is a valid way to delete all rows from a table without removing the table structure?
Both A and B are correct
TRUNCATE TABLE table;
DROP TABLE table;
DELETE FROM table;
Question 13
What is the purpose of the ON DELETE CASCADE constraint?
It updates child rows when parent is deleted
It deletes the parent row when a child row is deleted
It prevents deletion of parent rows
It deletes child rows when the parent row is deleted
Question 14
Which SQL statement is used to create a new database?
CREATE DATABASE
NEW DATABASE
MAKE DATABASE
ADD DATABASE
Question 15
What does the IN operator do?
Checks if a value exists in a subquery
Checks if a value is NULL
Checks if a value is within a range
Checks if a value matches any value in a list
Question 16
Which clause is used to sort the result set?
ORDER BY
ARRANGE BY
SORT BY
GROUP BY
Question 17
What is a subquery?
A query that is executed before the main query
A query that returns multiple rows
A query nested inside another query
A query that uses the UNION operator
Question 18
Which of the following is true about indexes in MySQL?
They speed up INSERT operations
They slow down SELECT queries
They are automatically created on all columns
They can speed up search queries but slow down writes
Question 19
What is the result of SELECT NULL = NULL?
FALSE
NULL
Error
TRUE
Question 20
Which of the following SQL commands is used to change data in an existing row?
MODIFY
UPDATE
CHANGE
ALTER
✅ Answered:
0
⬜ Unanswered:
8
📊
20%
done
Submit Answers →