OceanBase icon

OceanBase

Execute SQL queries in OceanBase database

Insert

AI-generated

Overview

This node performs an insert operation into a specified table in an OceanBase database. It is useful for adding new records to a database table by specifying the target table, columns, and corresponding values. For example, it can be used to insert a new user record with fields like id, name, and email.

Use Case Examples

  1. Insert a new user into the 'users' table with columns 'id', 'name', and 'email' and corresponding values.
  2. Add a new product entry into a 'products' table by specifying the product details.

Properties

Name Meaning
Table Name of the table to insert data into.
Columns Comma-separated list of column names to insert values into.
Values Comma-separated list of values to insert, supporting expressions.
Options Additional options for the insert operation, including query parameters and fields to return.

Output

JSON

  • affectedRows - Number of rows affected by the insert operation.
  • insertId - ID of the inserted row, if applicable.

Dependencies

  • OceanBase database connection using credentials with host, port, database, user, and password.

Troubleshooting

  • Common issues include incorrect table or column names, mismatched values count, or database connection errors.
  • Errors may occur if the SQL syntax is invalid or if required parameters are missing.
  • Ensure that the credentials for the OceanBase database are correctly configured and that the database is accessible.

Discussion