12
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

MySQL ERROR 1136 (21S01)の解決方法

Last updated at Posted at 2019-09-28

Mysqlにてgoodというテーブルに以下の値をINSERTしようとした

INSERT INTO good VALUES(1,"ペン",120);

すると、以下のエラーが発生。

ERROR 1136 (21S01): Column count doesn't match value count at row 1

どうやら、INSERTする値の数とカラムの数が合っていないとダメだらしい。テーブルのカラムは4つあった。

INSERT INTO good VALUES(1,"ペン",120,NULL);

として入力すると、解決。

12
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
12
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?