RefLib

Reference library for AI

Back

postgresql_16:7.1.150.3 Outputs

PostgreSQL 16 > Reference > SQL Commands > INSERT > Outputs

On successful completion, an INSERT command returns a command tag of the form INSERT *oid* *count* The *count* is the number of rows inserted or updated. *oid* is always 0 (it used to be the OID assigned to the inserted row if *count* was exactly one and the target table was declared WITH OIDS and 0 otherwise, but creating a table WITH OIDS is not supported anymore).

If the INSERT command contains a RETURNING clause, the result will be similar to that of a SELECT statement containing the columns and values defined in the RETURNING list, computed over the row(s) inserted or updated by the command.

Back