可以帮忙改下这个SQL语句吗?想替换成Oracle能用的
CREATETABLEMDUseLog(NIDNUMBERIDENTITY(1,1)NOTNULL,SPhoneNumbervarchar(40)NULL,STeleco...
CREATE TABLE MDUseLog(
NID NUMBER IDENTITY(1,1) NOT NULL,
SPhoneNumber varchar(40) NULL,
STelecom VARCHAR2 (3) NULL,
DStart DATE NULL,
DEnd DATE NULL,
NBytesSent NUMBER NULL,
NBytesRecv NUMBER NULL,
SRes varchar(40) NULL,
SContentsID varchar(50) NULL,
SEtc varchar(50) NULL,
CONSTRAINT PK_MDUseLog PRIMARY KEY CLUSTERED
(
NID ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON PRIMARY
) ON PRIMARY 展开
NID NUMBER IDENTITY(1,1) NOT NULL,
SPhoneNumber varchar(40) NULL,
STelecom VARCHAR2 (3) NULL,
DStart DATE NULL,
DEnd DATE NULL,
NBytesSent NUMBER NULL,
NBytesRecv NUMBER NULL,
SRes varchar(40) NULL,
SContentsID varchar(50) NULL,
SEtc varchar(50) NULL,
CONSTRAINT PK_MDUseLog PRIMARY KEY CLUSTERED
(
NID ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON PRIMARY
) ON PRIMARY 展开
1个回答
展开全部
oracle没用自增长,用序列,另外你的语句后面的我不太明白,如果是要设置主键的话,用下面的代码:
create table MDUSELOG
(
nid NUMBER not null,
sphonenumber VARCHAR2(40),
stelecom VARCHAR2(3),
dstart DATE,
dend DATE,
nbytessent NUMBER,
nbytesrecv NUMBER,
sres VARCHAR2(40),
scontentsid VARCHAR2(50),
setc VARCHAR2(50)
);
alter table MDUSELOG add constraint PK_MDUseLog primary key (NID);--设置主键
来自:求助得到的回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询