Reputation: 1356
In MySQL I can declare a table as -
CREATE TABLE table1 ( column1 INT );
I can also declare a table as -
CREATE TABLE table2 ( column2 INT SIGNED );
So is there any difference between the two tables or are they same?
Upvotes: 0
Views: 39
Reputation: 7114
Extracted from MySQL official documentation about Numeric type syntax:
"Numeric data types that permit the UNSIGNED attribute also permit SIGNED. However, these data types are signed by default, so the SIGNED attribute has no effect."
Therefore both columns in your example above have the same datatype of INT SIGNED
. Unless you're defining one of it as UNSIGNED
, then there's a difference.
Upvotes: 1