This is already available in MariaDB as "EXCEPT"
returns the Result of the query 1 that is not found in the result of query 2
MariaDB [world]> select * From City where id between 456 and 457 except select * from City where id=456;
|
+-----+------------+-------------+----------+------------+
|
| ID | Name | CountryCode | District | Population |
|
+-----+------------+-------------+----------+------------+
|
| 457 | Birmingham | GBR | England | 1013000 |
|
+-----+------------+-------------+----------+------------+
|
Oracle Doc: https://www.techonthenet.com/oracle/minus.php