pattern matching

In MySQL, SQL patterns are case-insensitive

True/false question

MySQL provides standard SQL pattern matching as well as a form of pattern matching based on extended regular expressions.
Please choose True or False for the following statement:
In MySQL, SQL patterns are case-insensitive by default.

MySQL pattern matching with prefix length index

Multiple choice question

SQL pattern matching enables you to use "%" to match an arbitrary number of characters.
For the following table:

CREATE TABLE Customers (
customer_id INT NOT NULL
, email VARCHAR(80) NOT NULL
// more fields
, PRIMARY KEY (customer_id)
, INDEX (email(40))
) ENGINE=InnoDB;

How can you improve the following query?

SELECT *
FROM Customers
WHERE email LIKE '%.com';

Syndicate content