Create table: smallint, decimal and float
/*
mysql> Drop table Product;
mysql> CREATE TABLE Product
-> (
-> ID SMALLINT,
-> Price DECIMAL(7,2),
-> Weight FLOAT(8,4)
-> );
Query OK, 0 rows affected (0.09 sec)
mysql> Describe Product;
+--------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------+--------------+------+-----+---------+-------+
| ID | smallint(6) | YES | | NULL | |
| Price | decimal(7,2) | YES | | NULL | |
| Weight | float(8,4) | YES | | NULL | |
+--------+--------------+------+-----+---------+-------+
3 rows in set (0.03 sec)
*/
Drop table Product;
CREATE TABLE Product
(
ID SMALLINT,
Price DECIMAL(7,2),
Weight FLOAT(8,4)
);
Describe Product;
Related examples in the same category