db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stephensr <stephe...@acm.org>
Subject Alter Table Column Attribute
Date Sat, 20 Mar 2010 20:23:39 GMT
I have a table that has a Decimal value column with the attributes shown below. When I try
to enter a decimal value less than 1 in the column it always shows up as 0. I am assuming
this is due to the fact that the column attribute "DECIMAL_DIGITS" is currently set to 0.

Does anyone know the proper Alter Table syntax for changing this DECIMAL_DIGITS attribute
from 0 to non-zero? Also if it is set to say 4 - does that mean that this column will accept
values with 4 digits after the decimal point?

thanks

rs


TABLE_CAT	
TABLE_SCHEM	a_schema
TABLE_NAME	a_table
COLUMN_NAME	the_decimal_value
DATA_TYPE	3
TYPE_NAME	DECIMAL
COLUMN_SIZE	5
BUFFER_LENGTH	(null)
DECIMAL_DIGITS	0  -------->> want to change this column attribute to have N-digits after
the decimal point, right now is 0
NUM_PREC_RADIX	10
NULLABLE	1
REMARKS	
COLUMN_DEF	(null)
SQL_DATA_TYPE	(null)
SQL_DATETIME_SUB	(null)
CHAR_OCTET_LENGTH	(null)
ORDINAL_POSITION	16
IS_NULLABLE	YES
SCOPE_CATLOG	(null)
SCOPE_SCHEMA	(null)
SCOPE_TABLE	(null)
SOURCE_DATA_TYPE	(null)
IS_AUTOINCREMENT	NO
Mime
View raw message