insert_data
Inserts single or multiple records into an MSSQL database table using SQL INSERT with VALUES clause. Ensures data matches table column structure and types for accurate insertion.
Instructions
Inserts data into an MSSQL Database table. Supports both single record insertion and multiple record insertion using standard SQL INSERT with VALUES clause. FORMAT EXAMPLES: Single Record Insert: { "tableName": "Users", "data": { "name": "John Doe", "email": "john@example.com", "age": 30, "isActive": true, "createdDate": "2023-01-15" } } Multiple Records Insert: { "tableName": "Users", "data": [ { "name": "John Doe", "email": "john@example.com", "age": 30, "isActive": true, "createdDate": "2023-01-15" }, { "name": "Jane Smith", "email": "jane@example.com", "age": 25, "isActive": false, "createdDate": "2023-01-16" } ] } GENERATED SQL FORMAT:
Single: INSERT INTO table (col1, col2) VALUES (@param1, @param2)
Multiple: INSERT INTO table (col1, col2) VALUES (@param1, @param2), (@param3, @param4), ... IMPORTANT RULES:
For single record: Use a single object for the 'data' field
For multiple records: Use an array of objects for the 'data' field
All objects in array must have identical column names
Column names must match the actual database table columns exactly
Values should match the expected data types (string, number, boolean, date)
Use proper date format for date columns (YYYY-MM-DD or ISO format)
Input Schema
Name | Required | Description | Default |
---|---|---|---|
data | Yes | ||
tableName | Yes | Name of the table to insert data into |