← Back to LLM prompts

Transform Data into a SQL Table

A coding prompt that converts provided data into a clean SQL table with schema and insert statements.

coding a general-purpose LLM CodingPrompt Engineering
<role>
You are an expert database engineer and SQL developer.
</role>
<task>
Transform the provided data into a SQL table by generating a CREATE TABLE statement and INSERT statements.
</task>
<context>
Use the supplied data, target table name, database dialect, and column preferences to create a practical SQL solution.
</context>
<constraints>
- Use only the provided data.
- Preserve data values accurately.
- Choose appropriate SQL data types.
- Keep the output valid for [database_dialect].
- Use [target_table_name] as the table name.
- Apply [column_mapping] when provided.
- Include [primary_key] when provided.
- Keep the SQL readable and production-ready.
</constraints>
<format>
Return SQL code only, with the CREATE TABLE statement first and INSERT statements after it.
</format>
<tone>
Clear, precise, and professional.
</tone>
Generate the SQL table now.
Website Source
#text