Insert DB 테이블의 accepting duplicate keys 옵션

1. Insert Syntax

INSERT dbtab – source

Syntax

… wa
  | {TABLE itab
[ACCEPTING DUPLICATE KEYS] }.

Alternatives:

1. … wa

2. … TABLE itab [ACCEPTING DUPLICATE KEYS] …

Effect

A non-table-like data object wa can be specified
after FROM and VALUES. After
FROM, an internal table itab
can also be specified. The contents of the row(s) to be inserted are taken from
these data objects. The escape character @ should
precede the workarea name or the internal table name (as should be the case with
every host
variable
).

2. System 변수 값

 – sy-subrc : 4

 – sy-dbcnt : 0 

※ If the addition ACCEPTING DUPLICATE KEYS is specified, all rows are inserted for which this is possible. The remaining rows are discarded and sy-subrc is set to 4. The system field sy-dbcnt is set to the number of rows that are inserted. 


Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments