I am creating a table using mysql.connector
in Python. When I insert an integer value into my table, SQL converts it to some other integer value. Here is my code:
cursor.execute("CREATE TABLE cleaned_data (myid VARCHAR(255), mynum INTEGER(255))")
cursor.execute("INSERT INTO cleaned_data(myid, mynum) VALUES(%s,%s)", ('mytext',25683838382092010098988))
rows = cursor.execute('select * from cleaned_data;')
for row in cursor:
print(row)
Here is the output of the printed row:
('mytext', 2147483647)
Any idea what is going on? I want my table to store my integer number, even if it is huge.