Microsoft Access Database Development With VBA

SQL Keywords: INTO



The INTO keyword is used in conjunction with the INSERT keyword to add a new record to a table (or a record set). The formula to use is:

INSERT INTO TableName VALUES(Column1, Column2, Column_n);


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

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

Here is another example:

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

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

Home Copyright © 2012-2013 FunctionX, Inc. Home