NaPraia 12 Denunciar post Postado Agosto 11, 2006 Olá galera.Me deparei agora com uma tabela que tem uns campos NUMBER, mas não tem nenhum número indicando qual é o tamanho.E como estou montando umas consultas no forms, preciso saber o tamanho.Alguém sabe qual é o tamanho default que o oracle adota nesses casos??Dá para modificar com o alter table??Estou querendo reduzir o tamanho. Pois preciso só de um NUMBER (7)Valeu!!!!! Compartilhar este post Link para o post Compartilhar em outros sites
Motta 645 Denunciar post Postado Agosto 11, 2006 tenta ver em user_tab_columns Compartilhar este post Link para o post Compartilhar em outros sites
alphamek 2 Denunciar post Postado Agosto 14, 2006 Existe a possibilidade de ver pela view user_tab_columns, igual ao Motta disse. SQL> select table_Name, column_name, data_type, data_length 2 from user_tab_columns 3 where table_name = 'SUA_TABELA'; Ou verificar os valores padrões de Data Types no Manual de Concepts do Oracle. Para DataType NUMBER o valor padrão é de 38 Bytes, abaixo segue um trecho do manual da Oracle. NUMBER DatatypeThe NUMBER datatype stores fixed and floating-point numbers. Numbers of virtually any magnitude can be stored and are guaranteed portable among different systems operating Oracle, up to 38 digits of precision.The following numbers can be stored in a NUMBER column:Positive numbers in the range 1 x 10-130 to 9.99...9 x 10125 with up to 38 significant digitsNegative numbers from -1 x 10-130 to 9.99...99 x 10125 with up to 38 significant digitsZeroPositive and negative infinity (generated only by importing from an Oracle Version 5 database)For numeric columns, you can specify the column as:column_name NUMBER Optionally, you can also specify a precision (total number of digits) and scale (number of digits to the right of the decimal point):column_name NUMBER (precision, scale) If a precision is not specified, the column stores values as given. If no scale is specified, the scale is zero.Oracle guarantees portability of numbers with a precision equal to or less than 38 digits. You can specify a scale and no precision:column_name NUMBER (*, scale) In this case, the precision is 38, and the specified scale is maintained.When you specify numeric fields, it is a good idea to specify the precision and scale. This provides extra integrity checking on input. Link para Artigo : DataType NUMBER Abraços, http://forum.imasters.com.br/public/style_emoticons/default/joia.gif Compartilhar este post Link para o post Compartilhar em outros sites
NaPraia 12 Denunciar post Postado Agosto 14, 2006 Valeu!!Aquele comando não ajudou, mas a explicação no manuel, digo, manual, foi muito útil.Aí esse era um dos problemas que eu estava enfrentando, no forms estava que permitia 40 char e aí dava erro.Valeu e inté + Compartilhar este post Link para o post Compartilhar em outros sites