|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
Im learning...
I have a column of Prices that are stored as 25.0000 (4 decimal places) What would I add to the following line to 'fix' my decimals to 0.00 (2 places)? Select Price from BlahTable Thank you. |
|
#2
|
|||
|
|||
|
I believe you can do this:
SELECT round(price,2) AS price FROM BlahTable WHERE etc. Regards lhall [This message has been edited by lhallusa (edited June 30, 2000).] [This message has been edited by lhallusa (edited June 30, 2000).] |
|
#3
|
|||
|
|||
|
Thank you. That did the trick. Only one small problem so far : If there are two zeros after the decimal the last one is dropped (25.0 instead of 25.00)
I shouldnt have a problem fixing this one though. [This message has been edited by NSupremo (edited June 30, 2000).] |
![]() |
| Viewing: Dev Shed Forums > Databases > MySQL Help > SQL help to format my decimal places! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|