创建一个table
CREATE TABLE customer_orders_t (
order_id
INT NOT NULL
GENERATED ALWAYS
AS IDENTITY
(START WITH 1
INCREMENT BY 1
MINVALUE 1
NO MAXVALUE
NO CYCLE
NO CACHE
ORDER),
order_date
DATE NOT NULL,
cust_id
INT NOT NULL,
product_id
INT NOT NULL,
quantity
INT NOT NULL,
price
DECIMAL(10,2)
NOT NULL,
status
CHAR(9)
NOT NULL,
PRIMARY KEY (order_date, order_id))
插入table中数据:
INSERT INTO customer_orders_t
VALUES
(
DEFAULT, CURRENT DATE,
:cid, :pid, :qty, :cost, 'PENDING')
:cid, :pid, :qty, :cost 是什么意思?请指教一下
------解决方案--------------------------------------------------------
变量
.
------解决方案--------------------------------------------------------
变量
.