Originally posted by jamuna:
I'm trying to retreive data from a table.the column type is decimal(8,2)
Heeya, Jams! That's no way of bargin' into the ranch just like bull with mad
cow disease.
Yer name be too short for the rules we 'avin 'ere, son. And what's yer business asking y' questions thrice over. Wrong place, too, m'lad -- there ain't no servlet or
JSP for an old cowboy to take a shot at.
If the ranch weren't such a friendly place, yer not be gettin' no answer at all that way!
The answer be in the java.sql.* JavaDoc, buddy. If y'don't know how to browse JavaDoc, you haven't got no business operating a compiler. But alright, we've all been young and rash, and -- aw, I'm ramblin' again.
The SQL DECIMAL and NUMERIC data types are used to express fixed point numbers where absolute precision is required. They are often used for currency values.
These two types can be expressed identically in Java. The most convenient mapping uses the java.math.BigDecimal extended precision number type provided in JDK1.1
We also allow access to DECIMAL and NUMERIC as simple Strings and arrays of chars. Thus Java programmers can use getString to receive a NUMERIC or DECIMAL result. That's what section 8.4 of the
JDBC Guide says, which is where the java.sql package description tells ya to look.
Heeya!
- Peter