Microsoft Access Database Development With VBA

SQL Keywords: INTO

   

Description

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);

Examples

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", "gmonay@ynb.com", "(104) 972-0416");
     
 

Home Copyright © 2012 FunctionX, Inc. Home