我在SQL开发人员中有以下代码,当我尝试运行代码来创建表时,它在这一行上失败:'exists_flag varchar2(1)y / n,'
create table moulds
(mould_id number,
mould_type varchar2(50),
mould_description varchar2(240),
exists_flag varchar2(1) y/n,
locate_id number,
);
有人能看出这条线有什么问题吗?为什么它一直说“缺少右括号”?
create table moulds
(mould_id number,
mould_type varchar2(50),
mould_description varchar2(240),
check (exists_flag in ( 'y', 'n' )),
locate_id number,
PRIMARY KEY (mould_id)
);
答案 0 :(得分:4)
将<{1}}替换为
y/n