List:General Discussion« Previous MessageNext Message »
From:A Pasetti Date:December 15 2003 2:42am
Subject:integer not being inserted correctly
View as plain text  
When attempting to insert an integer into an integer
column, a different value is being inserted for the
given row. Check out the sql below to see what I mean.
The integer 7819359281 is somehow changed to
2147483647 when it's inserted.

Perhaps someone has experienced this problem and could
suggest a fix. I'm using MySQL 4.0.

Your advice will be greatly appereciated.

Thanks,

Andrew Pasetti

*****SQL QUERY RESULTS BELOW*********

mysql> create table TmpPhoneNumbers
    -> (
    -> token char(12) not null,
    -> number int(12) primary key
    -> );
Query OK, 0 rows affected (0.05 sec)

mysql> insert into TmpPhoneNumbers (token,number)
values ('dabw6pz6zkbc',7819359281);
Query OK, 1 row affected (0.05 sec)

mysql> select * from TmpPhoneNumbers;
+--------------+------------+
| token        | number     |
+--------------+------------+
| dabw6pz6zkbc | 2147483647 |
+--------------+------------+
1 row in set (1.06 sec)

__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/
Thread
integer not being inserted correctlyA Pasetti15 Dec
  • Re: integer not being inserted correctlyDan Nelson15 Dec
  • Re: integer not being inserted correctlyPaul DuBois15 Dec
  • Re: integer not being inserted correctlyDavid Griffiths15 Dec
    • Re: integer not being inserted correctlyDaniel Kasak15 Dec
    • Re: integer not being inserted correctlyPaul DuBois15 Dec
    • RE: integer not being inserted correctlyMike Brando15 Dec
RE: integer not being inserted correctlyCharles E Sweet15 Dec