|
Re: Help for a noobie! [message #683105 is a reply to message #683102] |
Thu, 03 December 2020 04:17 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](http://www.orafaq.com/forum/images/custom_avatars/102589.gif) |
Michel Cadot
Messages: 68675 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
Welcome to the forum.
Please read the OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.
Indent the code, use code tags and align the columns in result.
Also always post your Oracle version, with 4 decimals (query v$version), as often solution depends on it.
SQL> CREATE TABLE result (
2 SubjectNo varchar2(8),
3 StudentNo varchar2(8),
4 Result varchar2(1) CONSTRAINT res_res_passfail_ck CHECK (result IN ('P','F')),
5 CONSTRAINT res_subno_studno_pk PRIMARY KEY(SubjectNo, StudentNo),
6 CONSTRAINT res_subno_fk FORIEGN KEY(SubjectNo) REFERENCES subject(SubjectNo),
7 CONSTRAINT res_studno_fk FORIEGN KEY(StudentNo) REFERENCES student(StudentNo));
CONSTRAINT res_subno_fk FORIEGN KEY(SubjectNo) REFERENCES subject(SubjectNo),
*
ERROR at line 6:
ORA-00907: missing right parenthesis
FORIEGN <> FOREIGN
|
|
|