MySQL Database Quiz Questions

Course Name:MySQL
Chapter Name:Chapter 7 - DQL (Data Query Language)
Lesson Content Link:'=' (equal to) Operator
Current Quiz Count:30
Progress
0%
Q1
True / False

In MySQL, the = (equal to) operator can be used to compare two strings.

Q2
True / False

The = operator in MySQL can only be used to compare numerical values.

Q3
True / False

In MySQL, the = operator is used to assign values to variables.

Q4
True / False

The = operator in MySQL is case-sensitive when comparing string values.

Q5
True / False

In MySQL, SELECT * FROM employees WHERE salary = 50000; will return rows where the salary is exactly 50000.

Q6
True / False

The = operator can be used in MySQL to compare NULL values.

Q7
True / False

In MySQL, the query SELECT * FROM users WHERE username = 'admin' will return all rows where the username column has the exact value 'admin'.

Q8
True / False

In MySQL, using the = operator to compare a column with a subquery result that returns multiple rows will cause an error.

Q9
True / False

The = operator in MySQL can be used in conjunction with the CASE statement to provide conditional logic.

Q10
True / False

In MySQL, SELECT * FROM products WHERE price = (SELECT MAX(price) FROM products); will return the product with the highest price.

Q11
Single Choice

What does the = operator do in MySQL?

Q12
Single Choice

Which SQL statement uses the = operator correctly to filter records?

Q13
Single Choice

In which scenario would the = operator be used in a WHERE clause?

Q14
Single Choice

Consider the products table with columns product_id, product_name, and price. Which query will return products priced at exactly 25?

Q15
Single Choice

Which query correctly selects records where the status column equals 'active'?

Q16
Single Choice

If a table employees has a column department_id, which query would retrieve all employees in department 3?

Q17
Single Choice

Which query correctly checks for equality between two columns in the same table?

Q18
Single Choice

Given a table inventory with columns item_id, item_name, and quantity, which query will correctly return items with a quantity of 0?

Q19
Single Choice

Which of the following statements uses the = operator correctly to join two tables on a matching column?

Q20
Single Choice

Given a table transactions with columns transaction_id, amount, and transaction_type, which query correctly retrieves records where the transaction_type is 'credit' and the amount equals 100?

Q21
Multiple Choice

Which query correctly retrieves records from the 'employees' table where 'department_id' is equal to 3?

SQL Code
SELECT *
FROM employees
WHERE department_id = 3;
Q22
Multiple Choice

Identify the correct SQL query that retrieves records from the 'orders' table where 'order_status' is equal to 'Shipped'.

SQL Code
SELECT *
FROM orders
WHERE order_status = 'Shipped';
Q23
Multiple Choice

Which query correctly selects records from the 'products' table where 'category_id' is equal to 10?

SQL Code
SELECT *
FROM products
WHERE category_id = 10;
Q24
Multiple Choice

Determine the correct SQL query that retrieves records from the 'customers' table where 'country' is equal to 'USA'.

SQL Code
SELECT *
FROM customers
WHERE country = 'USA';
Q25
Multiple Choice

Which SQL query retrieves records from the 'inventory' table where 'quantity' is equal to 100?

SQL Code
SELECT *
FROM inventory
WHERE quantity = 100;
Q26
Multiple Choice

Which query correctly retrieves records from the 'sales' table where 'total_sales' is equal to 5000?

SQL Code
SELECT *
FROM sales
WHERE total_sales = 5000;
Q27
Multiple Choice

Determine the correct SQL query that selects records from the 'transactions' table where 'transaction_amount' is equal to 100.

SQL Code
SELECT *
FROM transactions
WHERE transaction_amount = 100;
Q28
Multiple Choice

Which SQL query retrieves records from the 'projects' table where 'budget' is equal to 50000?

SQL Code
SELECT *
FROM projects
WHERE budget = 50000;
Q29
Multiple Choice

Identify the correct query that retrieves records from the 'clients' table where 'revenue' is equal to 200000.

SQL Code
SELECT *
FROM clients
WHERE revenue = 200000;
Q30
Multiple Choice

Which SQL query correctly retrieves records from the 'students' table where 'marks' are equal to 85?

SQL Code
SELECT *
FROM students
WHERE marks = 85;