Using the INSERT statement
190
Using the INSERT statement
The
INSERT
statement allows you to insert data without first putting it into a
flat file. Using this command, you can either:
•
Insert a specified set of values row by row
•
Insert directly from database tables
See the sections that follow for details of these two forms of the command.
Inserting specified values row by row
To add specified values to a table row by row, use the
INSERT
statement with
this syntax:
INSERT [ INTO ]
[
owner.] table_name
[ (
column_name, ...) ]
... VALUES (
expression...)
Adaptive Server IQ inserts the first value you specify into the first column you
specify, the second value you specify into the second column, and so on. If you
omit the list of column names, the values are inserted into the table columns in
the order in which the columns were created (the same order as
SELECT *
would retrieve). Adaptive Server IQ inserts the row into the table wherever
room is available.
Values can be NULL, any positive or negative number, or a literal.
•
Enclose values for
CHAR
,
VARCHAR
,
DATE
,
TIME
, and
TIMESTAMP
or
DATETIME
columns in single or double quotation marks. To indicate a
value with a quotation in it use a different set of quotes for the outer quote,
such as “Smith' s”.
Summary of Contents for Adaptive Server IQ 12.4.2
Page 1: ...Administration and Performance Guide Adaptive Server IQ 12 4 2 ...
Page 16: ...xvi ...
Page 20: ...Related documents xx ...
Page 40: ...Compatibility with earlier versions 20 ...
Page 118: ...Troubleshooting startup shutdown and connections 98 ...
Page 248: ...Importing data by replication 228 ...
Page 306: ...Integrity rules in the system tables 286 ...
Page 334: ...Cursors in transactions 314 ...
Page 396: ...Users and permissions in the system tables 376 ...
Page 438: ...Determining your data backup and recovery strategy 418 ...
Page 484: ...Network performance 464 ...
Page 500: ...System utilities to monitor CPU use 480 ...
Page 514: ...Characteristics of Open Client and jConnect connections 494 ...
Page 536: ...Index 516 ...