The INSERT INTO SELECT command duplicates data from the “Suppliers” table into the “Customers” table, with unfilled columns containing NULL values.
INSERT INTO Customers (CustomerName, City, Country) SELECT SupplierName, City, Country FROM Suppliers; |
The following SQL replicates data from the “Suppliers” table into the “Customers” table, populating all columns:
INSERT INTO Customers (CustomerName, ContactName, Address, City, PostalCode, Country) SELECT SupplierName, ContactName, Address, City, PostalCode, Country FROM Suppliers; |
The provided SQL selectively duplicates only the German suppliers into the “Customers” table:
INSERT INTO Customers (CustomerName, City, Country) SELECT SupplierName, City, Country FROM Suppliers WHERE Country=‘Germany’; |