我正在尝试通过Oracle Live SQL学习SQL。以下是我的第一个代码。请帮我解决错误
CREATE TABLE Persons
(
PersonID int,
LastName varchar(255),
FirstName varchar(255),
Address varchar(255),
City varchar(255)
)
INSERT INTO Persons (Person ID, LastName, FirstName, Address, City)
VALUES (103980, 'Ramanathan', 'Arun', 'Chennai', 'India')
我收到此错误:
ORA-00922:缺少或无效选项
答案 0 :(得分:-1)
插入代码中的Person ID
中有空格(第8行)
用户PersonID
代替Person ID
CREATE TABLE Persons (
PersonID int,
LastName varchar(255),
FirstName varchar(255),
Address varchar(255),
City varchar(255)
);
INSERT INTO Persons (PersonID, LastName, FirstName, Address, City)
VALUES (103980, 'Ramanathan', 'Arun', 'Chennai', 'India')