SQL for Reality > SQL Statements Supported by Reality > INSERT Statement

Comment on this topic

Documentation Comments

Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.

RealityV15.1Online Documentation (MoTW) Revision 7

INSERT Statement (SQL) (m691508+insert.htm)

To

Reality

Version

Topic

Submitted by

Company

Location

Email address

Comment

 

 

INSERT Statement

Adds new rows into a table.

Syntax

INSERT INTO table-name {(column-identifier{,column-identifier}...)} [query-specification || VALUES (insert-value{,insert-value}...)]

Syntax Elements

table-name =
{owner-name.}table-identifier

owner-name
The SQL user-id of the creator of the table

table-identifier
The name of the required table.

column-identifier
Any user-defined name (except a Reserved Word) starting with a letter and comprising up to 49 letters, underscores and/or numbers. Letters are case sensitive.

query-specification =
SELECT {[ALL || DISTINCT]} select-list FROM table-reference-list {WHERE search-condition} {GROUP BYcolumn-name {,column-name{...}}} {HAVING search-condition}

Refer to the SELECT statement for full definition.

insert-value =
dynamic-parameter || literal || NULL || USER

dynamic-parameter =
?

literal =
character string, numeric or date value. Refer to the topic SQL Expression.

Restrictions

The user performing this statement requires SQL INSERT privileges.

Comment

If no column-identifier list is specified, this statement uses a default list consisting of all columns in the table in the order they were defined. This is the same list as is used in a "SELECT * FROM table" statement.

Examples

INSERT INTO EMP (EMPNO, ENAME, TITLE) VALUES(1234, 'SMITH?, ?AUTHOR?)
INSERT INTO EMP2 SELECT * FROM EMP WHERE DEPTNO = 90020

RealityV15.1 (MoTW) Revision 7Comment on this topic