Home » SQL & PL/SQL » SQL & PL/SQL » datatype
datatype [message #192] Sat, 26 January 2002 03:39 Go to next message
sara
Messages: 36
Registered: February 2000
Member
hi,
somebody please explain
datatype
1) NUMBER(p,s)
Number having precision p and scale s. The precision p can range from 1 to 38. The scale s can range from -84 to 127.
2) binary data
Re: datatype [message #194 is a reply to message #192] Sat, 26 January 2002 15:42 Go to previous messageGo to next message
jim
Messages: 74
Registered: July 2000
Member
the p is amount of numbers u can have b4 the decimal and s for the amount after

eg

the number 1234.75 would have a p = 4 and a s = 2

if wouldnt matter if u increase p or s but if you were to decrease you would truncate the number and loose acccuracy
Re: datatype [message #199 is a reply to message #192] Mon, 28 January 2002 01:05 Go to previous message
Diwakar Bhandari
Messages: 7
Registered: January 2002
Junior Member
P as u already know is Precision (ranging from 1 to 38 ) ... Its is basically the number u can have before the decimal point ...

S is for scale (ranging from -84 to 127 ) .It represents the no of numbers U can have after the decimal point .

I oracle u can specify a number in three formats :1) Number(p,s)
2) Number
3) Number(p) --- by default scale is taken as 0

Basically we use precision and scale for extra integrity checking on input.if value exceeds the precision then Oracle returns an error , if the values exceeds the scale , Oracle rounds it up ...

BFile contains a locator to large binary file stored outside the database

Regards
Diwakar
Previous Topic: how java call pl/sql?
Next Topic: 8i lite
Goto Forum:
  


Current Time: Sat Apr 04 22:31:16 CDT 2020