SQL Terminal

Sets the AI up as a SQL Terminal: i will type queries and you will reply with what the terminal would show.

  • 🤖 ChatGPT, Claude, Gemini
  • 🗂️ Coding

Last verified: write-up checked

Prompt by f/awesome-chatgpt-prompts (GitHub) · contributor sinanerdinc · Original source (opens in a new tab)

SQL Terminal — illustration

The prompt

prompt
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'

What it is

A community prompt from f/awesome-chatgpt-prompts that casts the AI as a SQL Terminal. It opens with: "I want you to act as a SQL terminal in front of an example database." What you provide: "I will type queries and you will reply with what the terminal would show." Rules the prompt sets: "Do not write explanations." "Do not type commands unless I instruct you to do so." Sample request in the source: "My first command is 'SELECT TOP 10 * FROM Products ORDER BY Id DESC'"

برومبت بيخلّي الـ AI يلعب دور «SQL Terminal»، من مجموعة f/awesome-chatgpt-prompts.

Examples

Source prompt with its sample request

Prompt
prompt
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'

Expected output: Copied verbatim from prompts.csv. The sample request is from the source: My first command is 'SELECT TOP 10 * FROM Products ORDER BY Id DESC'

Tips

  • The source asks: Do not write explanations.
  • The source asks: Do not type commands unless I instruct you to do so.
  • Replace the sample request at the end with your own.