Fix errors
Last modified: June 12, 2025
If your SQL code is not working as expected, you can use AI Assistant to diagnose the issue and suggest solutions. This is helpful when you’re trying to determine why a query or function returns an error or does not produce the expected result.
To fix errors:
1. Start a new AI Assistant chat.
2. In the input area, click Attach Database, then select the database you want to attach. Attaching a database enables AI Assistant to provide more accurate suggestions based on your schema.
3. Enter the SQL code you want to troubleshoot in the input area. Ask AI Assistant to review it and suggest corrections.
4. Apply the suggested changes, run the corrected code in your database, and check the results.
Tip
If the error persists, instead of simply repeating the same error, try adjusting your prompt or providing additional details.