CREATE TABLE products_a (prod_id CHAR(10) NOT NULL, vend_id CHAR(10) NOT NULL, prod_name char(254) NOT NULL, prod_price DECIMAL(8,2) NOT NULL, prod_desc VARCHAR(1000) NULL);
使用null值
CREATE TABLE orders_o (order_num INTEGER NOT NULL, order_date datetime NOT NULL, cust_id CHAR(10));
指定默认值
CREATE TABLE orderitems_o (order_num INTEGER NOT NULL, order_item INTEGER NOT NULL, prod_id CHAR(10) NOT NULL, quantity INTEGER NOT NULL DEFAULT 1, item_price DECIMAL(8,2) NOT NULL);
SELECT * FROM orderitems_o;