SMALLINT data type and a default value of 1
mysql>
mysql> CREATE TABLE AuthorBios
-> (
-> AuthID SMALLINT UNSIGNED NOT NULL,
-> YearBorn YEAR NOT NULL,
-> NumBooks SMALLINT NOT NULL DEFAULT 1
-> );
Query OK, 0 rows affected (0.01 sec)
mysql>
mysql> drop table AuthorBios;
Query OK, 0 rows affected (0.00 sec)
Related examples in the same category