请将一下orcale的SQL代码转化为SQL SERVER create table LIS_BSE_APPLY_UNIT_EXTEND ( OID NUMBER(15) not null constraint PK_LIS_BSE_APPLY_UNIT_EXTEND primary key, APPLY_UNIT_OID NUMBER(15) constraint FK_LIS_BSE_APPLY_EXTEND_UNIT references LIS_BSE_APPLY_UNIT on delete set null, COLLECT_TYPE_OID NUMBER(15), PROCESS_TIME NUMBER(8, 2), SAMPLE_TIME VARCHAR2(50), SAMPLE_TIPS VARCHAR2(100), SEND_REPORT_TIPS VARCHAR2(100), SORT_BY NUMBER(8), PYCODE VARCHAR2(10), WBCODE VARCHAR2(10), UPDATED_BY NUMBER(15), UPDATED_ON DATE, STATE NUMBER(8) default 1, VERSION NUMBER(8), SEND_DEPT_CODE VARCHAR2(50), PE_BARCODE_COUNT NUMBER(8) default 1, IPD_BARCODE_COUNT NUMBER(8) default 1, OPD_BARCODE_COUNT NUMBER(8) default 1 )
时间: 2024-02-14 08:26:58 浏览: 173
在SQL Server中,可以将Oracle的SQL代码转换为以下代码:
CREATE TABLE LIS_BSE_APPLY_UNIT_EXTEND
(
OID NUMERIC(15,0) NOT NULL,
APPLY_UNIT_OID NUMERIC(15,0),
COLLECT_TYPE_OID NUMERIC(15,0),
PROCESS_TIME NUMERIC(8,2),
SAMPLE_TIME VARCHAR(50),
SAMPLE_TIPS VARCHAR(100),
SEND_REPORT_TIPS VARCHAR(100),
SORT_BY NUMERIC(8,0),
PYCODE VARCHAR(10),
WBCODE VARCHAR(10),
UPDATED_BY NUMERIC(15,0),
UPDATED_ON DATE,
STATE NUMERIC(8,0) DEFAULT 1,
VERSION NUMERIC(8,0),
SEND_DEPT_CODE VARCHAR(50),
PE_BARCODE_COUNT NUMERIC(8,0) DEFAULT 1,
IPD_BARCODE_COUNT NUMERIC(8,0) DEFAULT 1,
OPD_BARCODE_COUNT NUMERIC(8,0) DEFAULT 1,
CONSTRAINT PK_LIS_BSE_APPLY_UNIT_EXTEND PRIMARY KEY (OID),
CONSTRAINT FK_LIS_BSE_APPLY_EXTEND_UNIT FOREIGN KEY (APPLY_UNIT_OID) REFERENCES LIS_BSE_APPLY_UNIT (OID) ON DELETE SET NULL
)
请注意,修改的部分包括数据类型和一些约束语句。
阅读全文