Insert value to a decimal value column
mysql>
mysql> CREATE TABLE dishes (
-> dish_id INT,
-> dish_name VARCHAR(255),
-> price DECIMAL(4,2),
-> is_spicy INT
-> );
Query OK, 0 rows affected (0.00 sec)
mysql>
mysql> INSERT INTO dishes (dish_id, dish_name, price, is_spicy)
-> VALUES (1, 'Braised Sea Cucumber', 6.50, 0);
Query OK, 1 row affected (0.00 sec)
mysql>
mysql> drop table dishes;
Query OK, 0 rows affected (0.00 sec)
mysql>
Related examples in the same category