既存のテーブルに新しい情報を挿入しようとしています。これは動作していない私のコードです:
INSERT INTO customer (cNo, cName, street, city, county, discount)
VALUES (10, Tom, Long Street, Short city, Wide County, 2);
どこが間違っているのですか?
文字列値には引用符を使用する必要があります。
INSERT INTO customer (cNo, cName, street, city, county, discount)
VALUES (10, 'Tom', 'Long Street', 'Short city', 'Wide County', 2);
文字列を適切に指定していません。次のようにする必要があります。
INSERT INTO customer (cNo, cName, street, city, county, discount)
VALUES (10, 'Tom', 'Long Street', 'Short city', 'Wide County', 2);
値をカンマで区切り、テキスト フィールドを引用符 (' ') で囲む必要があります。これをチェック
このコードを試してください:
INSERT INTO customer (cNo, cName, street, city, county, discount)
VALUES (10, 'Tom', 'Long Street', 'Short city', 'Wide County', 2);