小编Bob*_*obC的帖子

我已创建CHECK约束但收到错误消息

create sequence student_studentid_seq
increment by 10
start with 100
nocycle;

create table student 
(studentid number(10),
name varchar2(30) not null,
ss# number(9) unique,
gpa number(2,3) not null,
  constraint student_studentid_pk PRIMARY KEY (studentid),
  constraint student_gpa_ck CHECK (GPA >= 0) );

insert into student (studentid, name, ss#, gpa)
              values(student_studentid_seq.NEXTVAL,'Draze Katan', 323456789,1);

receiving error message:
Error starting at line 29 in command:
insert into student (studentid, name, ss#, gpa)
              values(student_studentid_seq.NEXTVAL,'Draze Katan', 323456789,1)
Error report:
SQL Error: ORA-01438: value larger than specified precision allowed for …
Run Code Online (Sandbox Code Playgroud)

sql oracle

2
推荐指数
1
解决办法
162
查看次数

标签 统计

oracle ×1

sql ×1