MYSQL COMMANDS
CREATE TABLE IF NOT EXISTS wo2018 LIKE Workorders;
INSERT INTO wo2018 SELECT * FROM OLDWorkorders WHERE YEAR(orderdate) > 2017
To copy not only the data but also all database objects associated with the orders
table, we use the following statements:
1
2
3
4
|
CREATE TABLE orders2019 LIKE orders;
INSERT orders2019
SELECT * FROM orders;
|