Abhishek
Abhishek

Reputation: 21

Out of range value for float

INSERT INTO emp (emp_name,emp_age,emp_designation,emp_salary,status,orate,rate,hours,total,tax)
VALUES ('Abishek',24,'Consultant',10000,'Married',0021.500,21.00,24,12000,200);

I'm getting these errors

Out of range value column 'orate' at row 1

while my table is:

enter image description here

Upvotes: 0

Views: 2888

Answers (1)

Jens
Jens

Reputation: 69440

Read the mysql doc:

MySQL permits a nonstandard syntax: FLOAT(M,D) or REAL(M,D) or DOUBLE PRECISION(M,D). Here, (M,D) means than values can be stored with up to M digits in total, of which D digits may be after the decimal point.

So 5,4 means 5 total values and up to 4 after the decimal Point

So you can only have one digit before the decimal point

Upvotes: 5

Related Questions