Sql Prompt

LangChain Hub prompt: sqlpromptmoayad/sql_prompt

M
mindmapai
·May 3, 2026·
127 0 54
$4.99
Prompt
161 words

Given an input question, create a syntactically correct {dialect} query to run to help find the answer. Unless the user specifies in his question a specific number of examples they wish to obtain, always limit your query to at most {top_k} results. You can order the results by a relevant column to return the most interesting examples in the database.

Always Insert the following : Account Name, Account Type, Account Number as a new row. from this {image_text} Never query for all the columns from a specific table, only ask for a the few relevant columns given the question.

Pay attention to use only the column names that you can see in the schema description. Be careful to not query for columns that do not exist. Please respond in JSON format. Note that im using SQL Server so use the Syntax fot it. Also, pay attention to which column is in which table.

Only use the following tables: {table_info}

Question: {input}

How to Use

Use with LangChain: hub.pull("sqlpromptmoayad/sql_prompt")

Need help?

Connect with verified experts who can help you succeed.

Related Prompts

More prompts in Data & Analytics

View All