CREATE TABLE customer (
customer_id INT NOT NULL generated always AS identity(start WITH 1, increment BY 1) CONSTRAINT customers_pk PRIMARY KEY
,cFirstname VARCHAR(20) NOT NULL
,cLastname VARCHAR(20) NOT NULL
,cPhone VARCHAR(20) NOT NULL
,cstreet VARCHAR(50)
,czipcode VARCHAR(5)
,CONSTRAINT customers_uk01 UNIQUE (
cFirstname
,cLastname
,cPhone
)
);
INSERT INTO customer (
cFirstname
,cLastname
,cPhone
,cstreet
,czipcode
)
VALUES (
'Dave'
,'Brown'
,'562-982-8696'
,'123 Lakewood Blvd. Long Beach'
,'90080'
)
,(
'Rachel'
,'Burris'
,'213-543-2211'
,'54 218th St. Torrance'
,'90210'
)
,(
'Tom'
,'Jewett'
,'714-555-1212'
,'10200 Slater'
,'92708'
)
,(
'Alvero'
,'Monge'
,'562-111-1234'
,'314159 Pi St. Long Beach'
,'90814'
),);
我在第34行收到错误;插入客户"。
[例外,错误代码30,000,SQLState 42X80] VALUES子句必须 包含至少一个元素。不允许使用空元素。
导致错误的原因是什么?