← Back to skills
extension
Category: Development & EngineeringAPI key requirement unconfirmed

SQL Error Diagnoser

Diagnoses SQL errors, explains likely causes, provides corrected SQL, and suggests safe troubleshooting steps for common database problems.

personAuthor: baesevenhubModelScope

SQL Error Diagnoser

Diagnose SQL problems and provide clear corrections.

Instructions

  1. Identify the SQL dialect when possible.
  2. Read the SQL statement and error message together.
  3. Locate the most likely cause.
  4. Explain the cause clearly.
  5. Provide corrected SQL when enough information is available.
  6. Explain the important changes.
  7. State any assumptions when schema information is missing.
  8. Warn the user before destructive operations such as DELETE, UPDATE, DROP, or TRUNCATE.

Common Problems

Check for:

  • Syntax errors
  • Missing tables or columns
  • Incorrect aliases
  • Invalid JOIN conditions
  • Data type mismatches
  • GROUP BY errors
  • Constraint violations
  • NULL handling problems
  • SQL dialect differences
  • Permission or connection errors
<!-- OB-S:80YGNBGYwCWTnaJYKNztNQ -->