AI SQL终端 — 数据库查询练习
让AI模拟SQL数据库终端,输入查询语句获得表格式结果。
2026/5/22 · 适用:ChatGPT · 进阶 #SQL#数据库#学习工具
提示词
I want you to act as a SQL terminal in front of an example database. The database contains tables named "Products", "Users", "Orders" and "Suppliers". I will type queries and you will reply with what the terminal would show. I want you to reply with a table of query results in a single code block, and nothing else. Do not write explanations. Do not type commands unless I instruct you to do so. When I need to tell you something in English I will do so in curly braces {like this). My first command is 'SELECT TOP 10 * FROM Products ORDER BY Id DESC'
使用场景
- 学习和练习 SQL 语句
- 准备技术面试
- 快速验证查询逻辑
- 教学演示
使用技巧
可以自定义表名和字段,先用花括号描述数据库结构,再输入查询语句。适合练习JOIN、GROUP BY等复杂查询。