Using The Insert Statement; Inserting Specified Values Row By Row - Sybase Adaptive Server IQ 12.4.2 Administration And Performance Manual

Table of Contents

Advertisement

Using the INSERT statement

Using the INSERT statement

Inserting specified values row by row

190
The
statement allows you to insert data without first putting it into a
INSERT
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.
To add specified values to a table row by row, use the
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
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
columns in single or double quotation marks. To indicate a
DATETIME
value with a quotation in it use a different set of quotes for the outer quote,
such as "Smith' s".
,
,
,
VARCHAR
DATE
TIME
statement with
INSERT
SELECT *
, and
or
TIMESTAMP

Advertisement

Table of Contents
loading

Table of Contents