I'd like to add a line to a table:
CREATE TABLE actors (
id_act serial NOT NULL,
first_name text NOT NULL,
last_name text NOT NULL,
CONSTRAINT actors_pkey PRIMARY KEY (id_act)
);
INSERT INTO actors (first_name, last_name) VALUES ('Tom', 'Hanks');
Using dBeaver, this statement provides the new ID:
select CurrVal(pg_get_serial_sequence('actors', 'id_act'));
With LibreOffice-BASE, I have to add the name of the scheme and this results in ERROR: column "scheme_name.table_name" does not exist I've got the same error using: "scheme_name.table_name" "scheme_name"."table_name" "table_name"
How can I get the new ID for further usage (calculation, check, ...)? I don't mind to use CurrVal or RETURNING or something else. But I don't find the proper syntax.
Thank you!