I have mysql table name 'marks' contains 4 fields
id, name, marks, avg
I give the sql query to mysql table like that
Update marks SET avg = marks/550*100
which gives result but there is no decimal value like 70.35 it shows only 70.
How it is possible.
mysql update SET problem?
Moderator: General Moderators
-
adilmarwat2004
- Forum Commoner
- Posts: 44
- Joined: Fri Sep 04, 2009 11:28 pm
Re: mysql update SET problem?
What is your Marks set as?
Integer = Allows whole numbers between -32,768 and 32,767
You need to make sure your data type is right.
Single = Single precision floating-point. Will handle most decimals
Double = Double precision floating-point. Will handle most decimals
http://www.w3schools.com/SQl/sql_datatypes.asp
Integer = Allows whole numbers between -32,768 and 32,767
You need to make sure your data type is right.
Single = Single precision floating-point. Will handle most decimals
Double = Double precision floating-point. Will handle most decimals
http://www.w3schools.com/SQl/sql_datatypes.asp