You are viewing our Forum Archives. To view or take place in current topics click here.
SQL Create Table Problem
Posted:
SQL Create Table ProblemPosted:
Status: Offline
Joined: Aug 19, 201014Year Member
Posts: 5,243
Reputation Power: 532
Status: Offline
Joined: Aug 19, 201014Year Member
Posts: 5,243
Reputation Power: 532
I'm trying to create a new table to add to an existing database.
Here is the entity-relationship diagram I created.
[ Register or Signin to view external links. ]
The EMPLOYEES table is the one that is part of the current database.
I have already created the CATEGORY table, that went fine.
I receive a "missing right parenthesis" error when trying to create the qualifications table and I cannot see what is causing the problem.
It's most likely very simple and I'm sure one of you guys will spot it instantly.
CREATE TABLE qualifications
(
qualification_id NUMBER(4),
title VARCHAR2(20),
category_id NUMBER(4),
description VARCHAR2(30),
CONSTRAINT qualifications_pk PRIMARY KEY (qualification_id)
CONSTRAINT qual_categopry_fk FOREIGN KEY (category_id) REFERENCES category(qual_category_id)
);
Here is the entity-relationship diagram I created.
[ Register or Signin to view external links. ]
The EMPLOYEES table is the one that is part of the current database.
I have already created the CATEGORY table, that went fine.
I receive a "missing right parenthesis" error when trying to create the qualifications table and I cannot see what is causing the problem.
It's most likely very simple and I'm sure one of you guys will spot it instantly.
The following 1 user thanked -Deano for this useful post:
Dusknoir (01-07-2016)
#2. Posted:
Status: Offline
Joined: Aug 19, 201014Year Member
Posts: 5,243
Reputation Power: 532
Status: Offline
Joined: Aug 19, 201014Year Member
Posts: 5,243
Reputation Power: 532
I was a mug and forgot a comma after the first constraint creation.
:facepalm:
Also managed to mess up some constraint names in my other tables so I need to redo them as well
:facepalm:
Also managed to mess up some constraint names in my other tables so I need to redo them as well
- 0useful
- 0not useful
#3. Posted:
Status: Offline
Joined: Dec 28, 20158Year Member
Posts: 627
Reputation Power: 28
Status: Offline
Joined: Dec 28, 20158Year Member
Posts: 627
Reputation Power: 28
-Deano wrote I was a mug and forgot a comma after the first constraint creation.
:facepalm:
Also managed to mess up some constraint names in my other tables so I need to redo them as well
So, is this problem fixed now? Or would you still be in need for help?
- 0useful
- 0not useful
#4. Posted:
Status: Offline
Joined: Aug 19, 201014Year Member
Posts: 5,243
Reputation Power: 532
Status: Offline
Joined: Aug 19, 201014Year Member
Posts: 5,243
Reputation Power: 532
Congenital wrote-Deano wrote I was a mug and forgot a comma after the first constraint creation.
:facepalm:
Also managed to mess up some constraint names in my other tables so I need to redo them as well
So, is this problem fixed now? Or would you still be in need for help?
Nah, it's all good man. Cheers.
- 0useful
- 0not useful
You are viewing our Forum Archives. To view or take place in current topics click here.