Hi all, I am facing some error on the database:

I declare a field in my database as VARCHAR(50), and i try to modify it to INTEGER(50), However i get this:

ERROR 1264 (22003): Out of range value adjusted for column 'MP1T' at row 2

And the field with data is as shown below:

+------+
| MP1T |
+------+
| 1    |
|      |
| 4    |
|      |
| 7    |
|      |
|      |
| 33   |
| 0    |
|      |
| 2    |
| 2    |
| 3    |
| 0    |
|      |

Because it contains nothing at row2, i try to declare as not null but fail. Anyone? Thanks

Recommended Answers

All 2 Replies

You might have to post this in the database forum, but why are you specifying INTEGER(50)? Shouldn't it just be a datatype INTEGER?

I mean, an Integer is a whole number. So "1" is just "1", not 1.0000.... therefore, I don't think INTEGER(50) makes any sense. Moreover, an INTEGER type in SQL server has a range of +/- 2147483647. Again, no size is specified like CHAR(X), VARCHAR(X), etc.

Try it and see if it works! Can't hurt!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.