DBAsupport.com Forums - Powered by vBulletin
Results 1 to 6 of 6

Thread: help with table

  1. #1
    Join Date
    Nov 2000
    Posts
    169

    Exclamation

    Hi "guys",
    I created a table and I think I did everything correct but I am getting an error that does not sound good to me.

    create table customer_info(
    cust_id char(3) NOT NULL,
    cust_add char(12) NOT NULL,
    acct_no char(35) NOT NULL,
    acct_password varchar(2)8 NOT NULL)
    storage(initial 5242880
    next 5242880
    minextents 1
    maxextents 500
    pctincrease 0)
    tablespace tablespace_name


    SQL>
    acct_password varchar(2)8 NOT NULL)
    *
    ERROR at line 5:
    ORA-00907: missing right parenthesis

    But line five looks good to me
    Can anybody point where I went wrong?

    thanks,
    learn

  2. #2
    Join Date
    Mar 2000
    Location
    CA
    Posts
    317
    It cannot be
    acct_password varchar(2)8 NOT NULL)
    *

    It should be
    acct_password varchar(28) NOT NULL)
    *
    Thanks
    Kishore Kumar

  3. #3
    Join Date
    Dec 2000
    Posts
    43
    Actually it should be varchar2(8). I think thats what you're trying to do here. The lenght is 8 and the datatype is varchar2

  4. #4
    Join Date
    Mar 2000
    Location
    CA
    Posts
    317
    That's correct, I did not check properly. it should be varchar2(28)
    Thanks
    Kishore Kumar

  5. #5
    Join Date
    Nov 2000
    Posts
    169
    thanks "guys" that really helped. I can't believe I mixed it up. Anyway thanks so much.

    still learning,
    learn

  6. #6
    Join Date
    Oct 2000
    Posts
    19
    Kishore,

    Question on: acct_password varchar(2)8

    8 is the length, varchar(2) is the datatype. Why you suggested to change the length to 28?

    Thanks.

Posting Permissions

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


Click Here to Expand Forum to Full Width