CREATE TABLE statement including two column definitions, SMALLINT data type and INT data type. : Small Int « Data Type « SQL / MySQL






CREATE TABLE statement including two column definitions, SMALLINT data type and INT data type.

     
mysql>
mysql>
mysql> CREATE TABLE Inventory
    -> (
    ->     ProductID SMALLINT(4) UNSIGNED ZEROFILL,
    ->     Quantity INT UNSIGNED
    -> );

mysql>
mysql> drop table Inventory;
Query OK, 0 rows affected (0.00 sec)

   
    
    
    
    
  








Related examples in the same category

1.Define and use small int
2.SMALLINT(m): 16-bit integer (2 bytes, -32,768 to + 32,767)
3.Use smallint to store year
4.SMALLINT data type and a default value of 1
5.SmallInt calculation
6.Compare smallint value