Your Data Navigator

Your Data Navigator

Share this post

Your Data Navigator
Your Data Navigator
Using ChatGPT to Write and Debug SQL Code

Using ChatGPT to Write and Debug SQL Code

June 25, 2025 Issue # 32

Leon Merker's avatar
Leon Merker
Jun 26, 2025
∙ Paid

Share this post

Your Data Navigator
Your Data Navigator
Using ChatGPT to Write and Debug SQL Code
1
Share

SQL is one of the most widely used computer languages for accessing databases. It is not difficult to learn. Although there are ways to use ChatGPT to analyze data from databases directly using English commands, using SQL directly is better. You or your

MacBook Pro with images of computer language codes
Photo by Caspar Camille Rubin on Unsplash

database administrator would have to change the setting for ChatGPT to directly access a database table on database management systems, such as SQL Server, MySQL, Oracle, etc.

Personally identifiable data (PID) should not be used with ChatGPT. ChatGPT is not secure and trains itself with what you give it, including confidential information such as social security numbers, student or employee ID’s and student names.

However, you can use ChatGPT to help write and debug queries, but it is the SQL queries that you use with your database, as you did long before AI tools existed.

The first example below will show how ChatGPT can be used to debug a query. Other

This post is for paid subscribers

Already a paid subscriber? Sign in
© 2025 Your Data Navigator
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share