![]() |
SQL-J Language Reference
|
Reference Manual |
INSERT statementAn INSERT statement creates a row or rows and stores them in the named table. Syntax
INSERT INTO { TableName | ExternalVirtualTable }
For more information about Query, see Query. The only valid properties for a PROPERTIES clause in an INSERT statement are insertMode property and optionally the bulkFetch property. See Bulk Insert Properties. NOTE: There is no transaction support for inserting into or deleting from an external virtual table; rolling back a statement that inserted into or deleted from an ExternalVirtualTable does not roll back the underlying insert or delete. Example
INSERT INTO Countries
INSERT INTO SouthAmericanCountries
-- You can insert the results of a subquery into a table,
-- use the fast import mode to insert into the
-- use the fast import mode to transfer data from
-- use the DEFAULT keyword to insert DEFAULT values
-- Insert the DEFAULT value for a column by
-- inserting into a read-write VTI Dependency SystemThe INSERT statement depends on the table being inserted into, all of the conglomerates (units of storage such as heaps or indexes) for that table, and any other table named in the query. Any statement that creates or drops an index or a constraint for the target table of a prepared INSERT statement invalidates the prepared INSERT statement. The INSERT depends on all aliases used in the query. Dropping aliases invalidates a prepared INSERT statement if the statement uses the alias. Interaction with Java Data TypesEach built-in type in SQL-J has a Java class associated with it. You can insert a value of a built-in type into a column of its corresponding Java class, and vice versa. Table 1-11, "Java Classes Associated with SQL-J Built-In Types", shows the correspondence between types. For example, you can insert an SQL-J INTEGER value into a SERIALIZE(java.lang.Integer) column, and you can insert a java.lang.Integer value into an SQL-J INTEGER column. When inserting into a column that stores a Java data type, Cloudscape checks whether the class of the object being inserted is assignable to the type of the column. If the object's class is not assignable to the column's Java data type, Cloudscape throws the statement exception: An attempt was made to put a data value of type "{0}" into a data value of type "{1}".
For more information, see Assignability. |
|
![]() Cloudscape Version 3.6 For information about Cloudscape technical support, go to: www.cloudscape.com/support/.Copyright © 1998, 1999, 2000 Informix Software, Inc. All rights reserved. |