vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Decimals are different from floating point numbers. Decimals are still considered a precise data type like integers, so the scale is important. I'd like to have a fomula of the precision and scale of the result types. Thanks! Fernando Nunes <spam@domus.online.pt> wrote in message news:<bdkkd0$sc70v$1@ID-161111.news.dfncis.de>... > Lan Huang wrote: > > I'd like to know what's the result precision and scale of the decimal > > arithmentic expression and aggregate function. > > > > For example, what's the result type of > > decimal(p1, s1)+decimal(p2, s2) > > decimal(p1, s1)-decimal(p2, s2) > > decimal(p1, s1)*decimal(p2, s2) > > decimal(p1, s1)/decimal(p2, s2) > > AVG(decimal(p1, s1)) > > etc > > > > It will also be nice if someone tell me which documentation describes > > the result types of the expressions and functions. > > > > Thanks, > > Lan > > Don't take this as a definitive answer but: > > - The precision of any floating point data type can vary with the > architecture. The are numbers wich cannot be represented exactly in some > standard representations. > > You can find some information in the SQL Reference Guide > > Regards |