insert (minimum)

Description

Adds new rows to a table or view.

Syntax

Transact-SQL Syntax

insert [into][database.[owner.]]{table_name | view_name}
 [(column_list)] 
 {values (expression [, expression]...)
 | select_statement}

ODBC Syntax

INSERT INTO table_name[(column_identifier[,column_identifier]
 ...)]
{query_specification|VALUES(insert_value
[,insert_value]...)

Parameters

values

is a keyword that introduces a list of expressions.

?

specifies parameters passed by ASE/CIS at the time the insert command is executed.

column_list

is a list of one or more columns to which data is to be added. The columns can be in any order, but the incoming data (whether in a values clause or select clause) is in the same order.

Examples

Example 1

insert titles
 (title_id, title, type, pub_id, notes, pubdate,contract)
 values (?, ?, ?, ?, ?, ?, ?)

Usage