|
Custom Search
| |
|
Create working tables to demonstrate how to mimic set operators MINUS, EXCEPT, INTERSECT in MySQL Here are the queries I used to create 4 working tables to demonstrate how to achieve the same effect as using set operators MINUS, EXCEPT, INTERSECT in MySQL because MySQL does not support these set operators. Table 1: suppliers_1 This query creates a table by using the original suppliers table in Northwind database. Note that only SupplierID 1 to 5 are loaded. create table suppliers_1 Here is the table created.
Table 2: suppliers_2 This query creates another table. Note that only SupplierID 3 to 8 are loaded. create table suppliers_2 Here is the table created.
Table 1 with checksum: suppliers_1_md5 This query creates a table from the original suppliers table. In addition, it also creates a new column called MD5 at the end. The MD5 column contains checksum values calculated by concatenating column SupplierID, CompanyName, ContactName, ContactTitle in suppliers table. Note that only SupplierID 1 to 5 are loaded. create table suppliers_1_md5 Here is the table created.
Table 2 with checksum: suppliers_2_md5 This query creates another table with a new column for checksum values. Note that only SupplierID 3 to 8 are loaded. create table suppliers_2_md5 Here is the table created.
Other tutorials in this category 1. Using Inner Joins to Combine Data from Two Tables |
Copyright © 2024 GeeksEngine.com. All Rights Reserved. This website is hosted by HostGator. No portion may be reproduced without my written permission. Software and hardware names mentioned on this site are registered trademarks of their respective companies. Should any right be infringed, it is totally unintentional. Drop me an email and I will promptly and gladly rectify it. |
Home | Feedback | Terms of Use | Privacy Policy |