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: Create table question

Re: Create table question

From: Pedro Lopes <pedro.lopes_at_netvisao.pt>
Date: Thu, 20 Jan 2005 19:27:23 +0000
Message-ID: <newscache$oarmai$8th$1@newsfront4.netvisao.pt>


dont know why are you using dual... but

create table test (ADate date, AFlag varchar2(30) default 'OK');

peteg_at_garlic.com wrote:
> I need to create and populate a table using a select statement where
> one of the columns is initially to be populated with the value 'OK'.
> However, this creates a char type, but I need it to be a varchar2
> because, subsequently, I will be modifying the value within that
> column.
>
> For example, when I try to create a table like this:
>
> create table test as select sysdate ADate, 'OK' AFlag from dual
>
> the column AFlag is a char(2).
> How do I force it to be a varchar2 from the gitgo?
>
> TIA
>
> Pete
>
Received on Thu Jan 20 2005 - 13:27:23 CST

Original text of this message

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