Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Create table question
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
![]() |
![]() |