INSERT dbtab

Short Reference

Syntax

INSERT { {INTO target VALUES source }
       | {     target FROM   source } }.

Effect

The INSERT statement inserts one or more rows specified in source in the database table specified in target. The two variants with INTO and VALUES or without INTO with FROM behave identically, with the exception that you cannot specify any internal tables in source after VALUES.

System Fields

The INSERT statement sets the values of the system fields sy-subrc and sy-dbcnt.

sy-subrc Meaning
0 At least one row was inserted.
4 At least one row could not be inserted, because the database table already contains a row with the same primary key or a unique secondary index.

Note