SQL> CREATE TABLE customers(acct_id VARCHAR2(10)PRIMARYKEY,
2 name VARCHAR2(30)NOTNULL,
3 zip_code CHAR(5)UNIQUE);
CREATE TABLE customers(acct_id VARCHAR2(10)PRIMARYKEY,
*
ERROR at line 1:
ORA-00907: missing right parenthesis
Novice level question about SQL
Page 1 of 11 Replies - 2450 Views - Last Post: 05 June 2012 - 04:43 AM
#1
Novice level question about SQL
Posted 06 April 2012 - 01:51 PM
Hey guys...I'm having some trouble figuring out why I can't create a simple Oracle10g table. I've tried all different spacing and syntax, but I keep getting the same error ( ERROR at line 1: missing right parenthesis).I know its not case sensitive etc...I've gone over this a thousand different ways. I'm sure it's something completely simple too. Can you guys please provide some feedback?
Replies To: Novice level question about SQL
#2
Re: Novice level question about SQL
Posted 05 June 2012 - 04:43 AM
Please remove the 4rth line from your code. It's a repeat of the first line.
If you were trying to add a primary constraint to the first column, you have already done that using PRIMARYKEY keyword in the first colum.
Rest look ok.
If you were trying to add a primary constraint to the first column, you have already done that using PRIMARYKEY keyword in the first colum.
Rest look ok.
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote



|