MariaDB 查詢特殊條件

有些特殊條件查詢,需要利用到組合式或JOIN方式查詢。例如:我們要查詢該表格內,有符合在其他表格的條件,皆不要列出的資料。此時可以用
select * from this_table where condition not in ( select condition from another_table );

select * from this_table except select condition from another_table;

參考資料
https://stackoverflow.com/questions/8768254/select-values-from-a-table-where-exclude-values-in-another-table

https://mariadb.com/kb/en/library/subqueries-and-joins/


這個網誌中的熱門文章

Upgrade php and httpd(apache) on CentOS 7

Installing VMware workstation pro on Ubuntu 22.X (Jammy Jellyfish)