-- 環境: ORACLE 19C
-- 1、建立序號
CREATE SEQUENCE APPS.CUX_TEST_S
minvalue 1
maxvalue 999999999999
start with 1
increment by 1
cache 10;
-- 2、建立表並指定主鍵ID預設值來源於序號“CUX_TEST_S”
CREATE TABLE CUX.CUX_TEST (
TEST_ID NUMBER default "APPS"."CUX_TEST_S"."NEXTVAL",
TEST_DESCRIPTION VARCHAR2(250)
) TABLESPACE CUX_TS_TX_DATA;