DESCRIBE PRODUCTS_TBL; +-----------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-----------+--------------+------+-----+---------+-------+ | PROD_ID | varchar(10) | NO | PRI | NULL | | | PROD_DESC | varchar(40) | NO | | NULL | | | COST | decimal(6,2) | NO | | NULL | | +-----------+--------------+------+-----+---------+-------+
SELECT * FROM PRODUCTS_TBL; +---------+-------------------------+-------+ | PROD_ID | PROD_DESC | COST | +---------+-------------------------+-------+ | 11235 | WITCH COSTUME | 29.99 | | 119 | ASSORTED MASKS | 4.95 | | 13 | FALSE PARAFFIN TEETH | 1.10 | | 15 | ASSORTED COSTUMES | 10.00 | | 222 | PLASTIC PUMPKIN 18 INCH | 7.75 | | 6 | PUMPKIN CANDY | 1.45 | | 87 | PLASTIC SPIDERS | 1.05 | | 9 | CANDY CORN | 1.35 | | 90 | LIGHTED LANTERNS | 14.50 | +---------+-------------------------+-------+
CREATE TABLE PRODUCTS_TMP SELECT * FROM PRODUCTS_TBL;
DESCRIBE PRODUCTS_TMP; +-----------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-----------+--------------+------+-----+---------+-------+ | PROD_ID | varchar(10) | NO | | NULL | | | PROD_DESC | varchar(40) | NO | | NULL | | | COST | decimal(6,2) | NO | | NULL | | +-----------+--------------+------+-----+---------+-------+
SELECT * FROM PRODUCTS_TMP; +---------+-------------------------+-------+ | PROD_ID | PROD_DESC | COST | +---------+-------------------------+-------+ | 11235 | WITCH COSTUME | 29.99 | | 119 | ASSORTED MASKS | 4.95 | | 13 | FALSE PARAFFIN TEETH | 1.10 | | 15 | ASSORTED COSTUMES | 10.00 | | 222 | PLASTIC PUMPKIN 18 INCH | 7.75 | | 6 | PUMPKIN CANDY | 1.45 | | 87 | PLASTIC SPIDERS | 1.05 | | 9 | CANDY CORN | 1.35 | | 90 | LIGHTED LANTERNS | 14.50 | +---------+-------------------------+-------+
INSERT INTO PRODUCTS_TMP SELECT * FROM PRODUCTS_TBL; SELECT * FROM PRODUCTS_TMP; +---------+-------------------------+-------+ | PROD_ID | PROD_DESC | COST | +---------+-------------------------+-------+ | 11235 | WITCH COSTUME | 29.99 | | 119 | ASSORTED MASKS | 4.95 | | 13 | FALSE PARAFFIN TEETH | 1.10 | | 15 | ASSORTED COSTUMES | 10.00 | | 222 | PLASTIC PUMPKIN 18 INCH | 7.75 | | 6 | PUMPKIN CANDY | 1.45 | | 87 | PLASTIC SPIDERS | 1.05 | | 9 | CANDY CORN | 1.35 | | 90 | LIGHTED LANTERNS | 14.50 | | 11235 | WITCH COSTUME | 29.99 | | 119 | ASSORTED MASKS | 4.95 | | 13 | FALSE PARAFFIN TEETH | 1.10 | | 15 | ASSORTED COSTUMES | 10.00 | | 222 | PLASTIC PUMPKIN 18 INCH | 7.75 | | 6 | PUMPKIN CANDY | 1.45 | | 87 | PLASTIC SPIDERS | 1.05 | | 9 | CANDY CORN | 1.35 | | 90 | LIGHTED LANTERNS | 14.50 | +---------+-------------------------+-------+
时间: 2024-11-12 03:03:29