Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: ADD columns
Yes,
That is true since boolean is not a valid type to use in a create table statement
it should be either a char or integer field. To limit the valid values to 'Y'
and 'N'
or 1 and 0 a check constraint should also be used.
Connor McDonald wrote:
> Paul J. McGlew wrote:
> >
> > alter table table_name add (etat_exp boolean, etat_exs boolean);
> > (replace "table_name" with the name of your table.)
> >
> > "Mr.X" wrote:
> >
> > > how can I add a column to a table without loosing everithing ?
> > > I want to add two columns : etat_exp and etat_exs both (boolean or char)
> > > That is my table :
> > >
> > > SERIE_DOC NUMBER(2) NOT NULL,
> > > NO_SOUS_SERIE NUMBER(3) NOT NULL,
> > > NO_SS_SOUS_SERIE FLOAT NOT NULL,
> > > LETTRE_DOC CHAR(1) NOT NULL,
> > > TEMPS_ACTIF_P NUMBER(2),
> > > TEMPS_SEMI_ACTIF_P NUMBER(2),
> > > DATE_CREATION_DOC DATE,
> > > DATE_FIN_ACTIF_P DATE,
> > > DATE_FIN_SEMI_ACTIF_P DATE,
> > > TEMPS_ACTIF_S NUMBER(2),
> > > TEMPS_SEMI_ACTIF_S NUMBER(2),
> > > DATE_FIN_ACTIF_S DATE,
> > > DATE_FIN_SEMI_ACTIF_S DATE,
> > > DESC_DESCRIPTION VARCHAR2(100),
> > > DIVISION VARCHAR2(50),
> > > NO_SEQUENCE_DOC NUMBER(3) NOT NULL,
> > > DESTIN_STATUS_P CHAR(1),
> > > DESTIN_STATUS_S CHAR(1),
> > > DESCRIPTEURS VARCHAR2(100),
> > >
> > > Thanx ! Pat
>
>
![]() |
![]() |