SHOW-LAST-INSERT

Name

SHOW LAST INSERT

Description

This syntax is used to view the result of the latest insert operation in the current session connection

grammar:

  1. SHOW LAST INSERT

Example of returned result:

  1. TransactionId: 64067
  2. Label: insert_ba8f33aea9544866-8ed77e2844d0cc9b
  3. Database: default_cluster:db1
  4. Table: t1
  5. TransactionStatus: VISIBLE
  6. LoadedRows: 2
  7. FilteredRows: 0

illustrate:

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

Example

Keywords

  1. SHOW, LASR ,INSERT

Best Practice