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: Rookie help request

Re: Rookie help request

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 7 Mar 2003 22:56:08 -0800
Message-ID: <92eeeff0.0303072256.4e743bf2@posting.google.com>


DA Morgan <damorgan_at_exesolutions.com> wrote in message news:<3E6918C9.F077E974_at_exesolutions.com>...
> Marcus Leon wrote:
>
> > Hello, newbie help appreciated!
> >
> > Is this the correct way to alter a field to make it NOT NULL?
> > ALTER TABLE TABLE_X
> > MODIFY (FIELD_Y DATE NOT NULL) TABLESPACE &&abc;
> >
> > Is this the correct way to add an index?
> > CREATE INDEX pq_idx_XYZ ON TABLE_X
> > (DATE_FIELD ASC) TABLESPACE &&def;
> >
> > Thanks
>
> Where did you find this syntax? Because the answer is no. There is no
> reason to specify a tablespace when altering a constraint.

I am sure you mean "when altering a table".

>
> ALTER TABLE TABLE_X
> MODIFY (FIELD_Y DATE NOT NULL);
Also... make sure to run an update on the column to replace nulls with some value before modifying it to be not null.

>
> and your syntax for creating an index should include the PCTFREE
> parameter.

Extent specs are optional. Maybe I am reading too much into it but "should include the PCTFREE" comes across as a compulsion.

Regards
/Rauf Sarwar Received on Sat Mar 08 2003 - 00:56:08 CST

Original text of this message

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