PostgreSQL Database Quiz Questions

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

In PostgreSQL, the NOT LIKE operator is used to check if a text value does not match a specified pattern.

Q2
True / False

In PostgreSQL, the % wildcard can be used with NOT LIKE to represent any sequence of characters.

Q3
True / False

In PostgreSQL, the _ wildcard can be used with NOT LIKE to represent exactly one character.

Q4
True / False

In PostgreSQL, the NOT LIKE operator is case-insensitive by default.

Q5
True / False

In PostgreSQL, the expression column NOT LIKE 'a%' will match any string that does not start with the letter 'a'.

Q6
True / False

In PostgreSQL, the NOT LIKE operator can be used in WHERE clauses to filter out rows where a column matches a specified pattern.

Q7
True / False

In PostgreSQL, using NOT LIKE with an indexed column will always result in efficient query performance.

Q8
True / False

In PostgreSQL, the expression column NOT LIKE '%value%' can be used to exclude rows where the column contains the substring 'value'.

Q9
True / False

In PostgreSQL, combining NOT LIKE with AND and OR operators allows for complex filtering conditions.

Q10
True / False

In PostgreSQL, the NOT LIKE operator can be used in combination with escape characters to exclude patterns containing literal % or _ characters.

Q11
Single Choice

Which of the following queries will return rows where the name column does not start with 'A' in PostgreSQL?

SQL Code
SELECT name
FROM employees
WHERE name NOT LIKE 'A%';
Q12
Single Choice

In PostgreSQL, how do you exclude rows where the email column contains '.com'?

SQL Code
SELECT email
FROM users
WHERE email NOT LIKE '%.com';
Q13
Single Choice

What will be the result of the following query in PostgreSQL?

SQL Code
SELECT *
FROM products
WHERE product_code NOT LIKE '123%';
Q14
Single Choice

How would you filter out rows where the address column does not include 'Street' anywhere in PostgreSQL?

SQL Code
SELECT address
FROM locations
WHERE address NOT LIKE '%Street%';
Q15
Single Choice

Which of the following queries will exclude rows where description does not end with 'good' in PostgreSQL?

SQL Code
SELECT description
FROM reviews
WHERE description NOT LIKE '%good';
Q16
Single Choice

What does the following PostgreSQL query do?

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

How do you exclude rows in PostgreSQL where the username column does not have an underscore followed by 'admin'?

SQL Code
SELECT username
FROM accounts
WHERE username NOT LIKE '%_admin';
Q18
Single Choice

Which query would exclude rows where file_name does not have an extension in PostgreSQL?

SQL Code
SELECT file_name
FROM documents
WHERE file_name NOT LIKE '%.%';
Q19
Single Choice

In PostgreSQL, how do you filter out rows where the serial_number does not follow the pattern 'SN-' followed by exactly 5 digits?

SQL Code
SELECT serial_number
FROM devices
WHERE serial_number NOT LIKE 'SN-_____';
Q20
Single Choice

Consider the following PostgreSQL query:

SQL Code
SELECT *
FROM transactions
WHERE transaction_code NOT LIKE 'TR_%'
 AND transaction_code NOT LIKE 'INV_%';
What does this query do?
Q21
Multiple Choice

Identify the SQL scripts that correctly use the NOT LIKE operator to exclude specific patterns in PostgreSQL.

Q22
Multiple Choice

Select the SQL scripts that correctly use the NOT LIKE operator with numeric values stored as text in PostgreSQL.

Q23
Multiple Choice

Determine the SQL scripts that correctly use the NOT LIKE operator with a pattern at the end of the string in PostgreSQL.

Q24
Multiple Choice

Identify the SQL scripts that correctly use the NOT LIKE operator with special characters in PostgreSQL.

Q25
Multiple Choice

Determine the SQL scripts that correctly use the NOT LIKE operator to exclude specific patterns in email addresses in PostgreSQL.

Q26
Multiple Choice

Identify the SQL scripts that correctly use the NOT LIKE operator with JOINs in PostgreSQL.

Q27
Multiple Choice

Determine the SQL scripts that correctly use the NOT LIKE operator with subqueries in PostgreSQL.

Q28
Multiple Choice

Identify the SQL scripts that correctly use the NOT LIKE operator with multiple conditions in PostgreSQL.

Q29
Multiple Choice

Determine the SQL scripts that correctly use the NOT LIKE operator to exclude patterns with special characters in PostgreSQL.

Q30
Multiple Choice

Identify the SQL scripts that correctly use the NOT LIKE operator to filter rows based on case sensitivity in PostgreSQL.