Trying to run a update script on a table, but getting an error:
ERROR: column "ok" does not exist LINE 2: SET first_name="ok", last_name="pk", email="ooo", phone="...
CREATE TABLE employee (
employee_id SERIAL PRIMARY KEY,
first_name varchar(255) NOT NULL,
last_name varchar(255) NOT NULL,
email varchar(255) NOT NULL,
phone varchar(255)
);
INSERT INTO employee(
first_name, last_name, email, phone)
VALUES ('Kyle', 'Belanger', '[email protected]', '(240) 298-4664');
UPDATE "employee"
SET first_name="ok", last_name="pk", email="ooo", phone="000"
WHERE employee_id = 1;
There is no need to wrap table name in double quote
"employee"
, and use single quotes for column valuesSee Working Example