oracle建表和sqlserver建表

 

oracle

declare
num number;
begin
select count(1) into num from user_all_tables where Upper(Table_Name) = Upper(‘SPLJDJBPZ‘);
if num=1 then
execute immediate ‘drop table SPLJDJBPZ‘;
end if;
end;
go
create table SPLJDJBPZ
(
SPLJDJBPZ_NM VARCHAR(36) not null,
SPLJDJBPZ_GLNM VARCHAR(36),
SPLJDJBPZ_JDMC VARCHAR(108),
SPLJDJBPZ_JDJB VARCHAR(2),
CREATOR VARCHAR2(36) not null,
CREATORNAME varchar2(128) not null,
CREATEDTIME TIMESTAMP(6) not null,
LASTMODIFIER VARCHAR2(36) not null,
LASTMODIFIERNAME varchar2(128) not null,
LASTMODIFIEDTIME TIMESTAMP(6) not null,
constraint PK_SPLJDJBPZ primary key (SPLJDJBPZ_NM)
)
GO

 

--------------------------------------------------------------------------------------------------------------------------

 

sqlserver

 

IF EXISTS (SELECT 1 FROM sysobjects WHERE sysobjects.name = ‘SZYDWJMMYZMB‘)
drop table SZYDWJMMYZMB
GO
create table SZYDWJMMYZMB
(
ID varchar(36) not null,
USERID varchar(36) null,
USERNAME varchar(128) null,
USERTEL varchar(20) null,
VERCODE varchar(8) null,
STATE varchar(2) null,
CREATEDTIME datetime not null,
ATTRIBUTE1 varchar(150) null,
ATTRIBUTE2 varchar(150) null,
ATTRIBUTE3 varchar(150) null,
ATTRIBUTE4 varchar(150) null,
ATTRIBUTE5 varchar(150) null,
constraint PK_SZYDWJMMYZMB primary key clustered (ID)
)
GO

oracle建表和sqlserver建表

上一篇:Docker_MYSQL


下一篇:操作系统学习笔记——第二章 进程的描述与控制(二)