oracle建表的报错,这个sql语句错在哪里了,求指教
说是没有右括号什么的.createtableDeptInfo(Dept_idinteger(2)notnull,Dept_namenvarchar2(20)notnull...
说是没有右括号什么的.
create table DeptInfo
(Dept_id integer(2) not null,
Dept_name nvarchar2(20) not null,
primary key(Dept_id)
)
create table PermInfo
(Perm_id integer(2) not null,
Perm_name nvarchar(20) not null,
primary key(Perm_id)
)
create table NameInfo
(User_name nvarchar2(100) not null,
User_psw nvarchar2(100) not null,
Dept_id integer(2) not null,
Perm_id integer(2) not null,
primary key(User_name),
foreign key(Dept_id) references DeptInfo(Dept_id),
foreign key(Perm_id) references PermInfo(Perm_id)
)
create table UserInfo
(User_id integer(10) not null,
User_name nvarchar2(100) not null,
log_time Date,
out_time Date,
Cdao_flag char(2) not null,
Ztui_flag char(2) not null,
Qqin_flag char(2) not null,
primary key(User_id),
foreign key(User_name) references NameInfo(User_name)
)
错误指向 integer(2)这里,不能这么写么,新手,求帮忙. 展开
create table DeptInfo
(Dept_id integer(2) not null,
Dept_name nvarchar2(20) not null,
primary key(Dept_id)
)
create table PermInfo
(Perm_id integer(2) not null,
Perm_name nvarchar(20) not null,
primary key(Perm_id)
)
create table NameInfo
(User_name nvarchar2(100) not null,
User_psw nvarchar2(100) not null,
Dept_id integer(2) not null,
Perm_id integer(2) not null,
primary key(User_name),
foreign key(Dept_id) references DeptInfo(Dept_id),
foreign key(Perm_id) references PermInfo(Perm_id)
)
create table UserInfo
(User_id integer(10) not null,
User_name nvarchar2(100) not null,
log_time Date,
out_time Date,
Cdao_flag char(2) not null,
Ztui_flag char(2) not null,
Qqin_flag char(2) not null,
primary key(User_id),
foreign key(User_name) references NameInfo(User_name)
)
错误指向 integer(2)这里,不能这么写么,新手,求帮忙. 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询