MySQL SUBSTRING
mysql_substringExtract substrings from column values in MySQL tables with specified start position and length. Optionally filter rows and include the source column for context.
Instructions
Extract substrings from column values.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| col | No | Alias for column | |
| name | No | Alias for table | |
| limit | No | Maximum number of rows to return | |
| start | No | Starting position (1-indexed) | |
| table | No | Table name (Note: Pass a table name, not a raw string) | |
| where | No | Additional WHERE clause for filtering | |
| column | No | Column name (Note: Pass a column name, not a raw string) | |
| filter | No | Alias for where | |
| length | No | Number of characters | |
| tableName | No | Alias for table | |
| includeSourceColumn | No | Include source column in output (default: false). Set to true for full context. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | Error code (e.g. VALIDATION_ERROR, QUERY_ERROR) | |
| data | No | ||
| error | No | Error message if operation failed | |
| details | No | Additional error context | |
| metrics | No | Token estimation metrics | |
| success | Yes | Whether the operation succeeded | |
| category | No | Error category (validation, query, connection, internal) | |
| suggestion | No | Suggested fix for the error | |
| recoverable | No | Whether the error is recoverable |