Access SQL INSERT INTO statements

Updated: 21 October 2023

CREATE TABLE tbl (
    bar LONG PRIMARY KEY, 
    foo VARCHAR(10) NOT NULL
);

Should fail because foo cannot be NULL

INSERT INTO tbl (bar) SELECT this FROM source;

Insert many rows

INSERT INTO tbl (bar, foo) SELECT what, ever FROM source;

Create a new table and add rows with a single statement

SELECT * INTO tbl_two FROM tbl;

Leave a comment