Here’s a basic example of a MySQL CREATE TABLE command.
CREATE TABLE `foo`.`example_01` ( `field_1` VARCHAR(255), `field_2` CHAR(10), `field_3` INT(10), `field_4` BIGINT(20), `field_5` DATETIME );
Notice that the ‘back tic’s on each column definition (the little ` characters) are optional in most cases. I use them for reasons I’ll discuss later on.
Also, for most columns you see a number in parentheses after the name of the type — that is the default size for displaying that value in a select statement.The actual size of the value you store in that column isn’t impacted by changing that number. Changing INT(10) to INT(12) won’t change the size of the data you can store in that column.