Accuracer: The First And Only BDE Alternative
Client-Server Single-File Embedded Database for Delphi / C++Builder / Kylix

INSERT Statement

Previous  Top  Next


The INSERT statement is used to add one or more rows of data in a table.


INSERT INTO table_reference [password 'pass'] [(columns_list)]
VALUES (update_values)

Use the INSERT statement to add rows of data to a single table.
MEMORY option specifies that in-memory table will be created.
The INTO clause specifies the table to receive the inserted data. The columns list is a comma-separated list, enclosed in parentheses, of columns in the table and is optional. If columns list is not specified the data will be inserted into all columns of the table.
The VALUES clause specifies data to be inserted to the table.

Here is an example how to add records using INSERT statement:

INSERT INTO Customer (CustNo,Company, City, State, Contact, LastInvoiceDate)
VALUES (5555,'AidAim Software','Phoenix','AZ','Ella Perelman','10/15/2002')

To add rows to one table that are retrieved from another table, omit the VALUES keyword and use a subquery as the source for the new rows:

INSERT INTO Customer_Sort
SELECT * FROM Customer_Share

© AidAim Software Accuracer: Contents-cross-platform Windows Linux Databas