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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Alter table add question

Re: Alter table add question

From: JSI FundRaising R&D Group <mjames_at_jsifrs.com>
Date: Mon, 07 Feb 2000 15:53:09 GMT
Message-ID: <OpAn4.11688$oU2.1952367@tw12.nn.bcandid.com>


Sorry I did have the parenthesis in my original test I just forget to type them here. What was actually my problem was putting the null.

This didn't work,
alter table gifts add (
  giftdiscod char(6) null,
  giftdiscnt number(16,2) default 0 not null);

This worked,
alter table gifts add (
  giftdiscod char(6) ,
  giftdiscnt number(16,2) default 0 not null);

Thanks for the help.

JSI FundRaising R&D Group wrote in message <0rHm4.4465$oU2.902500_at_tw12.nn.bcandid.com>...
>We are adding columns to every table in our database. I am having trouble
>getting the syntax to allow me to add multiple columns in one statement.
>Can anybody tell me what I am doing wrong or is this something you can't do
>in Oracle. Here is an example.
>
>I want to do this:
>alter table gifts add
> giftdiscod char(6) null,
> giftdiscnt number(16,2) default 0 not null;
>
>I had to do this to get it to work:
>ALTER TABLE gifts ADD (giftdiscod char(6) null);
>ALTER TABLE gifts ADD (giftdiscnt NUMBER(16,2) DEFAULT 0 NOT NULL);
>
>Michaele James
>JSI FundRaising Systems
>Senior Programmer/Analyst
>
>
Received on Mon Feb 07 2000 - 09:53:09 CST

Original text of this message

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