前提・実現したいこと
SQLコマンドで、DBのtableを作成したいです。
DB名:sample_shop/table名:product
> create database sample_shop; Query OK, 1 row affected (0.02 sec)
> create table sample_shop.product (id int(12), name varchar(30), price int(12), image varchar(50), delv int(12), isSale int(12)); Query OK, 0 rows affected (0.04 sec)
ここまでは順調でしたが、以下のコマンドでエラーが発生しました。
> insert into sample_shop.product(id int(12), name varchar(30), price int(12), image varchar(50), delv int(12), isSale int(12)) value(1, Michael<br>スマホケース, 1580, http://localhost/shop/images/01.png, 0, 1);
発生している問題・エラーメッセージ
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'int(12), name varchar(30), price int(12), image varchar(50), delv int(12), isSale' at line 1
どこに誤りがあるのでしょうか?
ご回答よろしくお願いします。
補足情報(FW/ツールのバージョンなど)
mac/tarmial使用。
回答3件
あなたの回答
tips
プレビュー