"Column not allowed here" INSERT 语句错误-ORA-00984

"Column not allowed here" error in INSERT statement-ORA-00984

我遇到了与这个相同的错误:"column not allowed here" error in INSERT statement .

我的 SQL table 的结构如下所示:

CREATE TABLE login
(
    login_id INTEGER PRIMARY KEY,
    username varchar(150) NOT NULL,
    password varchar(150) NOT NULL
);

INSERT INTO login (login_id, username, password) 
VALUES ('9', 'Mukov', '1884');
INSERT INTO login (login_id, username, password) 
VALUES ('10', 'Mukre', '661');

我是不是做错了什么?

编辑:即使那样也行不通

CREATE TABLE login
(
    login_id INTEGER PRIMARY KEY,
    username varchar(150) NOT NULL,
    password varchar(150) NOT NULL
);

BEGIN
    INSERT INTO login (username, password)
    VALUES ('1', 'Sukre', '1234');
    INSERT INTO login (username, password) 
    VALUES ('2', 'Pal', '123444');
END;

将您的插入语句更新为 -

BEGIN
    INSERT INTO login(login_id, username , password )VALUES (1,'Sukre','1234');
    INSERT INTO login(login_id, username , password ) VALUES (2,'Pal','123444');
END;
/