NOT LIKE
This page is part of MariaDB's Documentation.
The parent of this page is: SQL Operators for MariaDB Enterprise Server
Topics on this page:
Overview
Performs pattern matching, negative.
USAGE
NOT LIKE text
NOT LIKE text ESCAPE character
EXAMPLES
CREATE TABLE not_like_example (
description VARCHAR(20),
example INT
);
INSERT INTO not_like_example VALUES
('Everything', 42),
('Dalmations', 101),
('Agent', 99),
('50% Off', 13),
('CPU', 64);
SELECT * FROM not_like_example
WHERE description NOT LIKE '%ing' AND description NOT LIKE '____t';
+-------------+---------+
| description | example |
+-------------+---------+
| Dalmations | 101 |
| 50% Off | 13 |
| CPU | 64 |
+-------------+---------+
SELECT * FROM not_like_example
WHERE description NOT LIKE '%#%%' ESCAPE '#';
+-------------+---------+
| description | example |
+-------------+---------+
| Everything | 42 |
| Dalmations | 101 |
| Agent | 99 |
| CPU | 64 |
+-------------+---------+
CHANGE HISTORY
EXTERNAL REFERENCES
Additional information on this topic may be found in the MariaDB Public Knowledge Base.