!
This page is part of MariaDB's Documentation.
The parent of this page is: SQL Operators for MariaDB Xpand
Topics on this page:
Overview
See NOT.
USAGE
! value
Value Name | Description |
---|---|
| The value to negate |
EXAMPLES
SELECT !42, !0, !NULL;
+------+------+-------+
| !42 | !0 | !NULL |
+------+------+-------+
| 0 | 1 | NULL |
+------+------+-------+
CREATE TABLE not_example (
description VARCHAR(20),
example INT
);
INSERT INTO not_example VALUES
('Everything', 42),
('Dalmations', 101),
('Agent', 99),
('B. Doz.', 13),
('CPU', 64);
SELECT *
FROM not_example
WHERE !(example = 101 OR description = 'B. Doz.');
+-------------+---------+
| description | example |
+-------------+---------+
| Everything | 42 |
| Agent | 99 |
| CPU | 64 |
+-------------+---------+