BEGIN
EXECUTE IMMEDIATE 'DROP TABLE business CASCADE CONSTRAINTS';
EXCEPTION
WHEN OTHERS THEN
IF SQLCODE != -942 THEN -- 942 是表不存在的错误码
RAISE;
END IF;
END;
CREATE TABLE business (
uuid VARCHAR2(255) NOT NULL,
product VARCHAR2(255) NULL,
promotion VARCHAR2(255) NULL,
value_added_service VARCHAR2(255) NULL,
logistics VARCHAR2(255) NULL,
weight NUMBER NULL,
color VARCHAR2(255) NULL,
version VARCHAR2(255) NULL,
shop VARCHAR2(255) NULL,
evaluate VARCHAR2(255) NULL,
order_num VARCHAR2(255) NULL,
rider VARCHAR2(255) NULL,
order_time TIMESTAMP NULL,
create_time TIMESTAMP NULL,
pay_price NUMBER(10, 2) NULL,
pay_type VARCHAR2(255) NULL,
address VARCHAR2(255) NULL,
CONSTRAINT business_pk PRIMARY KEY (uuid)
);