Microsoft Access Database Development With VBA

SQL Keywords: INSERT



The INSERT keyword can be used to add a new record to a table (or a record set). The formula to use is:

INSERT TableName VALUES(Column1, Column2, Column_n);


Here is an example that adds a record to a table:

INSERT Employees VALUES("Jimmy", "Collen");

Here is another example:

CREATE Table Employees(FirstName Text,
                       LastName Text,
                       EmailAddress Varchar,
                       HomePhone Char);

INSERT Employees(FirstName, LastName, EmailAddress, HomePhone)
          VALUES("Gertrude", "Monay", "", "(104) 972-0416");

Home Copyright © 2012 FunctionX, Inc. Home