Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2003
    Location
    down on the cube farm, left then right then another left
    Posts
    467

    Unanswered: "create table" advice wanted

    Oracle 9iDB

    Given the following is it possible to get vls created as a varchar2?
    Code:
    SQL> create table teb as select  '1234567890' vls from dual;
    
    Table created.
    
    SQL> desc teb
     Name                                      Null?    Type
     ----------------------------------------- -------- ---------
     VLS                                                CHAR(10)
    NOTE: Please disregard the label "Senior Member".

  2. #2
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    create table teb as select cast('1234567890' as varchar2(10)) vls from dual;
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  3. #3
    Join Date
    Nov 2003
    Location
    down on the cube farm, left then right then another left
    Posts
    467
    Great! I had tried the type cast model

    select (varchar2(10)) '1234567890' from dual
    but it had failed
    NOTE: Please disregard the label "Senior Member".

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •