VeloDB Cloud
SQL Manual
Statments
Show-Statements
SHOW-LAST-INSERT

SHOW-LAST-INSERT

Name

SHOW LAST INSERT

Description

This statement is used to display the result of the latest insert operation in the current session connection

Syntax:

SHOW LAST INSERT

Example of returned result:

     TransactionId: 64067
             Label: insert_ba8f33aea9544866-8ed77e2844d0cc9b
          Database: default_cluster:db1
             Table: t1
TransactionStatus: VISIBLE
        LoadedRows: 2
      FilteredRows: 0

Description:

  • TransactionId: transaction id
  • Label: the label corresponding to the insert task
  • Database: the database corresponding to the insert task
  • Table: the table corresponding to the insert task
  • TransactionStatus: transaction status
    • PREPARE: preparation stage
    • PRECOMMITTED: pre-commit stage
    • COMMITTED: the transaction succeeded, but the data were not visible
    • VISIBLE: the transaction succeeded and the data are visible
    • ABORTED: transaction failed
  • LoadedRows: number of imported rows
  • FilteredRows: the number of rows being filtered

Example

Keywords

SHOW, LASR ,INSERT

Best Practice