0

既存のテーブルに新しい情報を挿入しようとしています。これは動作していない私のコードです:

INSERT INTO customer (cNo, cName, street, city, county, discount)
VALUES (10, Tom, Long Street, Short city, Wide County, 2);

どこが間違っているのですか?

4

3 に答える 3

4

文字列値には引用符を使用する必要があります。

INSERT INTO customer (cNo, cName, street, city, county, discount)
VALUES (10, 'Tom', 'Long Street', 'Short city', 'Wide County', 2);
于 2013-11-06T13:53:23.577 に答える
3

文字列を適切に指定していません。次のようにする必要があります。

INSERT INTO customer (cNo, cName, street, city, county, discount) 
VALUES (10, 'Tom', 'Long Street', 'Short city', 'Wide County', 2);
于 2013-11-06T13:52:12.317 に答える
2

値をカンマで区切り、テキスト フィールドを引用符 (' ') で囲む必要があります。これをチェック

このコードを試してください:

INSERT INTO customer (cNo, cName, street, city, county, discount) 
VALUES (10, 'Tom', 'Long Street', 'Short city', 'Wide County', 2);
于 2013-11-06T13:55:03.483 に答える