UltraLite Database User's Guide
Dynamic SQL
Dynamic SQL statements
Use this statement to insert a single row into a table (Syntax 1) or to insert the results from a SELECT statement into the table (Syntax 2).
INSERT [ INTO ] table-name [ ( column-name, ... ) ]
VALUES ( expression, ... )
INSERT [ INTO ] table-name [ ( column-name, ... ) ]
SELECT statement
The INSERT statement is used to add new rows to a database table.
Insert a single row with the specified expression values. If the optional list of column names is given, the values are inserted one for one into the specified columns. If the list of column names is not specified, the values are inserted into the table columns in the order they were created (the same order as retrieved with SELECT *). The row is inserted into the table at an arbitrary position.
If you specify column names, the columns from the select list are matched ordinally with the columns specified in the column list, or sequentially in the order in which the columns were created.
Character strings inserted into tables are always stored in the same case as they are entered, regardless of whether the database is case sensitive or not. Thus a string Value inserted into a table is always held in the database with an upper-case V and the remainder of the letters lower case. SELECT statements return the string as Value. If the database is not case sensitive, however, all comparisons make Value the same as value, VALUE, and so on. Further, if a single-column primary key already contains an entry Value, an INSERT of value is rejected, as it would make the primary key not unique.
None.
Add an Eastern Sales department to the database.
INSERT INTO department ( dept_id, dept_name ) VALUES ( 230, 'Eastern Sales' )