I have a table in which there is a column "column_float" which is of data type float but the value inserted for this column is an integer value 5
When I read this value through python mysql connector it gives me a float value 5.0
My requirement is that if an integer value is there in the float column it should be read as an integer only without adding any extra precision.
Any help here ? Any settings for python mysql connector to do so.
Floating point have always decimals, but you can check if it has any and then round only when there is only a zero.
Replace the @a with your column name
Result
And form any other like
Result
For python there a there same functions