MS Access INSERT INTO statement without values

In a table like this

CREATE TABLE [MyTable] (
    [Id] int not null identity(1,1)
);

      

What is an insert statement to insert a record?

I've tried these assertions (no success):

INSERT INTO MyTable
INSERT INTO MyTable () VALUES ()
INSERT INTO MyTable VALUES
INSERT INTO MyTable VALUES ()
INSERT INTO MyTable () VALUES

      

+3


source to share


1 answer


Ok I have ... This is the same syntax as SQL Server, but in case of MS Access is undocumented

INSERT INTO MyTable DEFAULT VALUES

      



EDIT
It works using OleDB.
It doesn't work inside MS Access 2007 (syntax error when working with DEFAULT).

0


source







All Articles