Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: sql wrong? missing left parenthesis error?

Re: sql wrong? missing left parenthesis error?

From: Karsten Farrell <kfarrell_at_belgariad.com>
Date: Tue, 19 Nov 2002 00:13:07 GMT
Message-ID: <nmfC9.363$iS1.31278232@newssvr14.news.prodigy.com>


Richard Foote wrote:
> "Karsten Farrell" <kfarrell_at_belgariad.com> wrote in message
> news:VvaC9.282$wt7.22136959_at_newssvr14.news.prodigy.com...
>
> <snip>
>

>>You'll find that your statement should be something like:
>>
>>CREATE TABLE kodUserSession (
>>   SessionID      number    not null
>>     constraint kodUserSession_PK
>>     primary key (SessionID),

>
>
> Hi Karsten,
>
> When you use column level constraints (such your example above), you don't
> re-specify the column name as it's implied and Oracle complains bitterly.
>
> Cheers
>
> Richard
>
>
>>   UserID         number    not null
>>     constraint kodUserSession_kodUser_FK
>>     foreign key (UserID)
>>     references kodUser (UserID)
>>     on delete cascade,
>>   LogonStamp     date,
>>   LogoffStamp    date,
>>   IPAddress      varchar2(16),
>>)
>>tablespace KOD_DATA
>>/

>
>
>
>

Thanks for the catch. In my own scripts, I normally (always) add the PK constraint after the final column. I guess I tried a little too hard to keep with the OP's statement layout ... and blew it. Received on Mon Nov 18 2002 - 18:13:07 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US