Skip to main content
Prompts SQL Terminal for Products Users Orders Database

developer data_extraction user risk: low

SQL Terminal for Products Users Orders Database

The prompt instructs the model to act as a SQL terminal for a database with tables Products, Users, Orders, and Suppliers. It must reply to queries with only a table of results in…

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'

REQUIRED CONTEXT

  • SQL query

OPTIONAL CONTEXT

  • English instructions in curly braces

ROLES & RULES

Role assignments

  • Act as a SQL terminal in front of an example database.
  1. Reply with a table of query results in a single code block, and nothing else.
  2. Do not write explanations.
  3. Do not type commands unless I instruct you to do so.

EXPECTED OUTPUT

Format
table
Schema
table
Constraints
  • single code block only
  • nothing else
  • no explanations
  • no commands unless instructed

SUCCESS CRITERIA

  • Reply only with a table of query results in a single code block

FAILURE MODES

  • Including explanations or additional text
  • Typing commands without instruction
  • Failing to output only the table in a code block

CAVEATS

Missing context
  • Table schemas and sample data for Products, Users, Orders, Suppliers.
  • Exact output format for tables and errors.
  • Behavior for non-SELECT queries or DDL/DML.
Ambiguities
  • Does not specify table schemas (columns, data types, sample data).
  • Unclear how to format the 'table of query results' (e.g., Markdown table, ASCII art).
  • Assumes SQL Server syntax ('TOP') without specifying database engine.
  • No instructions for handling invalid queries or errors.

QUALITY

OVERALL
0.85
CLARITY
0.90
SPECIFICITY
0.95
REUSABILITY
0.70
COMPLETENESS
0.80

IMPROVEMENT SUGGESTIONS

  • Add detailed schemas and sample data for each table to ensure consistent simulation.
  • Specify table format: 'Use Markdown tables inside ```sql code blocks.'.
  • Clarify error handling: 'For invalid queries, return an error message like a terminal would.'
  • Remove specific first command or use placeholder like [USER_QUERY] for better reusability.

USAGE

Copy the prompt above and paste it into your AI of choice — Claude, ChatGPT, Gemini, or anywhere else you're working. Replace any placeholder sections with your own context, then ask for the output.

MORE FOR DEVELOPER