INSERT INTO “GROUPS1”
(“ID” “FIRST” “SURNAME”)
SELECT “ID” “FIRST” “SURNAME”
FROM “MEMBERS”
I get an unexpected token: FIRST in statement.
no matter how I try to fix it there is always a problem.
I want to add three columns to an existing table. if i insert a comma the comma is an unexpected token if I remove the brackets the same message apppears.
Libre base HSQLDB embedded Latest update Libre office Mac Monterey
INSERT is for adding one or more new rows of data into a table.
ALTER TABLE … ADD adds the new column to the end of the column list
See Chapter 9. SQL Syntax
INSERT is command for inserting values into existing fields of a table. You want to ALTER a table and add fields.
ALTER TABLE "Groups1" ADD "ID" INT
But might be you don’t want to change an existing table. You want to create a new table:
CREATE TABLE "Groups1" ("ID" INT PRIMARY KEY, "First" VARCHAR(50), "Surname" VARCHAR(50));
But the normal way for Base users will be: Right mouseclick on “Members” → Copy. Then right mousclick on tables background → Insert. Wizard will appear an you could create a new table with hte values you want.
See Base Guide 7.3