Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Oracle ALL_TAB_COLUMNS

Oracle ALL_TAB_COLUMNS

Scheduled Pinned Locked Moved Database
csharpdatabaseoracletutorial
6 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mycroft Holmes
    wrote on last edited by
    #1

    I have changed the data type of the currencyID and countryID from NUMBER to INTEGER as number is not supported by dotnet. When I run this query the data_type is still number.

    SELECT C.Table_Name ,
    C.Column_ID ,
    C.Column_Name ,
    C.Data_Type,
    C.char_length
    FROM ALL_TAB_COLUMNS C
    WHERE C.TABLE_NAME = 'CURRENCY'
    ORDER BY C.column_ID

    Any idea how to refresh the ALL_TAB_COLUMNS view or can there be another reason for the change not showing. Also - any suggestions as to the best Oracle support site. No it's not CP, we are very MS oriented.

    Never underestimate the power of human stupidity RAH

    J 1 Reply Last reply
    0
    • M Mycroft Holmes

      I have changed the data type of the currencyID and countryID from NUMBER to INTEGER as number is not supported by dotnet. When I run this query the data_type is still number.

      SELECT C.Table_Name ,
      C.Column_ID ,
      C.Column_Name ,
      C.Data_Type,
      C.char_length
      FROM ALL_TAB_COLUMNS C
      WHERE C.TABLE_NAME = 'CURRENCY'
      ORDER BY C.column_ID

      Any idea how to refresh the ALL_TAB_COLUMNS view or can there be another reason for the change not showing. Also - any suggestions as to the best Oracle support site. No it's not CP, we are very MS oriented.

      Never underestimate the power of human stupidity RAH

      J Offline
      J Offline
      Jorgen Andersson
      wrote on last edited by
      #2

      In Oracle, Integer is simply Number(38). So if you create a column as an Integer it's converted to number(38)

      "When did ignorance become a point of view" - Dilbert

      M 1 Reply Last reply
      0
      • J Jorgen Andersson

        In Oracle, Integer is simply Number(38). So if you create a column as an Integer it's converted to number(38)

        "When did ignorance become a point of view" - Dilbert

        M Offline
        M Offline
        Mycroft Holmes
        wrote on last edited by
        #3

        When I look at the table in Schema view (toad) I see integer, if I script the table out I get integer, I'm betting if I used a parameter with a data type it would be integer as well. I have now found that if I create a new table the columns do not show up in the ALL_TAB_COLUMN view, seems it might be a permissions thing. As NUMBER is not supported by dot net this seems very strange! Do all the orm tools convert number to integer/decimal.

        Never underestimate the power of human stupidity RAH

        J 1 Reply Last reply
        0
        • M Mycroft Holmes

          When I look at the table in Schema view (toad) I see integer, if I script the table out I get integer, I'm betting if I used a parameter with a data type it would be integer as well. I have now found that if I create a new table the columns do not show up in the ALL_TAB_COLUMN view, seems it might be a permissions thing. As NUMBER is not supported by dot net this seems very strange! Do all the orm tools convert number to integer/decimal.

          Never underestimate the power of human stupidity RAH

          J Offline
          J Offline
          Jorgen Andersson
          wrote on last edited by
          #4

          I haven't worked in Toad so I can't say. But an implicit conversion in dotnet is generally making a widening conversion to decimal unless the scale of the number is specifically 0 then it converts to integer. If you want a different conversion you have to specify it in the parameters of the dataadapter/datareader. Here's [^]more info on types. And here http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1619552483055 is some info on the subject from Tom Kyte, who is an institution in the Oracle World <edit> fixed link, kind of</edit>

          "When did ignorance become a point of view" - Dilbert

          modified on Monday, November 8, 2010 5:07 AM

          M 1 Reply Last reply
          0
          • J Jorgen Andersson

            I haven't worked in Toad so I can't say. But an implicit conversion in dotnet is generally making a widening conversion to decimal unless the scale of the number is specifically 0 then it converts to integer. If you want a different conversion you have to specify it in the parameters of the dataadapter/datareader. Here's [^]more info on types. And here http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1619552483055 is some info on the subject from Tom Kyte, who is an institution in the Oracle World <edit> fixed link, kind of</edit>

            "When did ignorance become a point of view" - Dilbert

            modified on Monday, November 8, 2010 5:07 AM

            M Offline
            M Offline
            Mycroft Holmes
            wrote on last edited by
            #5

            Thanks for the links Jorgen, it looks like the orm will need to do some dancing around the number conversion in dotnet. Tom's link seems to have died but that could be b/c of my net nazi, I'm at work. It seems like anything with no scale is an integer, precision seems to range from null to 22 for no discernable reason with both null and 22 being valid for an integer. Numbers in between have a scale and therefore decimal I guess.

            Never underestimate the power of human stupidity RAH

            J 1 Reply Last reply
            0
            • M Mycroft Holmes

              Thanks for the links Jorgen, it looks like the orm will need to do some dancing around the number conversion in dotnet. Tom's link seems to have died but that could be b/c of my net nazi, I'm at work. It seems like anything with no scale is an integer, precision seems to range from null to 22 for no discernable reason with both null and 22 being valid for an integer. Numbers in between have a scale and therefore decimal I guess.

              Never underestimate the power of human stupidity RAH

              J Offline
              J Offline
              Jorgen Andersson
              wrote on last edited by
              #6

              It seems to me that the link to Tom's article is destroyed by the hamsters, so here it is as inline code: http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1619552483055

              "When did ignorance become a point of view" - Dilbert

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups