The INSERT statement is used to insert one or more rows into a table or view.

1 Insert

<insert
    table='table'
    columns='columns'
    prefix='prefix'
>
    <column
        name='name'
        value='value'
    /> *
    <select /> ?
</insert>
Example

Example of insertion by columns:

Copy
<insert table='cdataemp'>
    <column name='ctafrm'>####.#####</column>
    <column name='tipdir'>0</column>
    <column name='ctaaux'>0</column>
</insert>
Example

Insert-select insert example

Copy
<insert table='tabla_destino'>
    <select>
        <columns>
            tabla_origen.columna1,
            tabla_origen.columna2,
            tabla_origen.columna3,
            tabla_origen.columna4
        </columns>
        <from table='tabla_origen'/>
        <where>
            tabla_origen.columna1 = 'A'
        </where>
    </select>
</insert>
Example

Example of insertion by variable prefix

Copy
<insert table='cdataemp' prefix='m_' />