Problem with INT when creating a table.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • falch006
    New Member
    • Feb 2008
    • 1

    Problem with INT when creating a table.

    Here is my problem...

    >CREATE TABLE int_test
    >(
    >number_one int(6)
    >);
    number_one int(6)
    *
    ERROR at line 3:
    ORA-00907: missing right parenthesis

    Always tells me I'm missing right parenthesis even though I've closed them all and I can't figure out why.
  • Dave44
    New Member
    • Feb 2007
    • 153

    #2
    Originally posted by falch006
    Here is my problem...

    >CREATE TABLE int_test
    >(
    >number_one int(6)
    >);
    number_one int(6)
    *
    ERROR at line 3:
    ORA-00907: missing right parenthesis

    Always tells me I'm missing right parenthesis even though I've closed them all and I can't figure out why.
    I dont think you can declare a scale for datatype int.
    Code:
    [147]gab_dev@DEV01> create table t (number_one int);
    
    Table created.
    
    Elapsed: 00:00:00.21
    [147]gab_dev@DEV01> insert into t values (111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111);
    
    1 row created.
    
    Elapsed: 00:00:00.04

    Comment

    • subashsavji
      New Member
      • Jan 2008
      • 93

      #3
      Originally posted by falch006
      Here is my problem...

      >CREATE TABLE int_test
      >(
      >number_one int(6)
      >);
      number_one int(6)
      *
      ERROR at line 3:
      ORA-00907: missing right parenthesis

      Always tells me I'm missing right parenthesis even though I've closed them all and I can't figure out why.
      create table a2 (a int);

      Comment

      • debasisdas
        Recognized Expert Expert
        • Dec 2006
        • 8119

        #4
        Since Int is a sub-type of number you can't specify the (p,s) values .

        By default INT=NUMBER(38).

        Comment

        Working...