MySQL Database Quiz Questions

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

In MySQL, the NOT LIKE operator is used to search for a specified pattern in a column.

Q2
True / False

MySQL's NOT LIKE can be used to exclude rows where a column value contains a specific substring.

Q3
True / False

MySQL's NOT LIKE operator can only be used with numeric data types.

Q4
True / False

In MySQL, the NOT LIKE operator is case-sensitive by default.

Q5
True / False

The MySQL query SELECT * FROM employees WHERE name NOT LIKE '%John%'; will return rows where the name contains the substring 'John'.

Q6
True / False

Using NOT LIKE 'A%' in a MySQL query will exclude rows where the column values start with the letter 'A'.

Q7
True / False

MySQL allows the use of multiple NOT LIKE conditions combined with the AND operator to exclude rows that match multiple patterns.

Q8
True / False

The MySQL query SELECT * FROM products WHERE description NOT LIKE '%cheap%' AND description NOT LIKE '%discount%'; will return rows where the description contains either 'cheap' or 'discount'.

Q9
True / False

MySQL's NOT LIKE operator can be used in a HAVING clause to filter out groups that do not match a specific pattern

Q10
True / False

In MySQL, SELECT * FROM orders WHERE order_status NOT LIKE 'completed%'; will return all rows where the order_status column does not start with the word 'completed'.

Q11
Single Choice

Which of the following SQL statements correctly uses the NOT LIKE operator to find records where the name column does not start with the letter 'A'?

Q12
Single Choice

Which of the following will return rows where the email column does not contain a '.com' domain?

Q13
Single Choice

What will the following SQL query return?

SQL Code
SELECT * FROM products WHERE product_name NOT LIKE '%phone%';
Q14
Single Choice

How would you modify the following SQL statement to return rows where the address column does not start with '123'?

SQL Code
SELECT * FROM customers WHERE address NOT LIKE '123%';
Q15
Single Choice

In the following SQL statement, which pattern will correctly exclude records where username contains any digits?

SQL Code
SELECT * FROM users WHERE username NOT LIKE '______';
Q16
Single Choice

What does the following query do?

SQL Code
SELECT * FROM orders WHERE order_id NOT LIKE 'ORD%';
Q17
Single Choice

Which SQL statement will return all rows where the phone_number column does not have a hyphen (-) as the second character?

SQL Code
SELECT * FROM contacts WHERE phone_number NOT LIKE '__-%';
Q18
Single Choice

How does the NOT LIKE operator behave in the following query?

SQL Code
SELECT * FROM employees WHERE name NOT LIKE '%Smith';
Q19
Single Choice

What does the following SQL statement do?

SQL Code
SELECT * FROM logs WHERE entry NOT LIKE '%error%';
Q20
Single Choice

In a MySQL certification exam, which query would return customers whose email does not end with '.org'?

SQL Code
SELECT * FROM customers WHERE email NOT LIKE '%.org';
Q21
Multiple Choice

Which query retrieves records from the 'employees' table where the 'name' does not start with the letter 'J'?

SQL Code
SELECT *
FROM employees
WHERE name NOT LIKE 'J%';
Q22
Multiple Choice

Identify the correct SQL query that retrieves records from the 'orders' table where 'order_id' does not end with '123'.

SQL Code
SELECT *
FROM orders
WHERE order_id NOT LIKE '%123';
Q23
Multiple Choice

Which query correctly selects records from the 'products' table where 'product_name' does not contain the word 'Pro'?

SQL Code
SELECT *
FROM products
WHERE product_name NOT LIKE '%Pro%';
Q24
Multiple Choice

Determine the correct SQL query that retrieves records from the 'customers' table where the 'email' does not contain the domain 'example.com'.

SQL Code
SELECT *
FROM customers
WHERE email NOT LIKE '%@example.com';
Q25
Multiple Choice

Which SQL query retrieves records from the 'inventory' table where 'item_code' does not start with 'A' and end with 'Z'?

SQL Code
SELECT *
FROM inventory
WHERE item_code NOT LIKE 'A%Z';
Q26
Multiple Choice

Which query correctly retrieves records from the 'sales' table where 'sales_rep' does not contain the letters 'ann'?

SQL Code
SELECT *
FROM sales
WHERE sales_rep NOT LIKE '%ann%';
Q27
Multiple Choice

Determine the correct SQL query that selects records from the 'transactions' table where 'transaction_id' does not start with 'TX' and end with '99'.

SQL Code
SELECT *
FROM transactions
WHERE transaction_id NOT LIKE 'TX%99';
Q28
Multiple Choice

Which SQL query retrieves records from the 'projects' table where 'project_name' does not start with 'Dev'?

SQL Code
SELECT *
FROM projects
WHERE project_name NOT LIKE 'Dev%';
Q29
Multiple Choice

Identify the correct query that retrieves records from the 'clients' table where 'client_name' does not contain the word 'Corp'.

SQL Code
SELECT *
FROM clients
WHERE client_name NOT LIKE '%Corp%';
Q30
Multiple Choice

Which SQL query correctly retrieves records from the 'students' table where 'student_id' does not start with 'S' and end with '1'?

SQL Code
SELECT *
FROM students
WHERE student_id NOT LIKE 'S%1';