-
create table emp
(
empno number(4) not null,
ename char(10),
job char(9),
mgr number(4),
hiredate date,
sal number(7,2),
comm number(7,2),
deptno number(2) not null,
foreign key(deptno) references dept(deptno)
constraint emp_f,
foreign key(empno) references emp
(empno) constraint emp_self,
primary key(empno) constraint emp_pri
);
@emp
I get an error with the following message:
constraint emp_f
*
ERROR at line 12:
ORA-00907: missing right paranthesis
I will be very grateful if anybody could tell me the problem.
Thank u.
Gautam Bhagwandas
Web Site : www.geocites.com/gautamzone
-
Wrong syntax. Change that to:
create table emp
(
empno number(4) not null,
ename char(10),
job char(9),
mgr number(4),
hiredate date,
sal number(7,2),
comm number(7,2),
deptno number(2) not null,
constraint emp_f foreign key(deptno) references dept(deptno),
constraint emp_self foreign key(empno) references emp(empno),
constraint emp_pri primary key(empno)
);
Jurij Modic
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|