Task prompt · Data

Convert a spreadsheet into a SQL table schema

by Agent Yard Team

Get CREATE TABLE statements with types, keys and constraints from a sample file.

You'll attach

Needs file

Works with

ChatGPTClaudeGeminiGrokCopilot

Use cases

  • Get CREATE TABLE statements with types, keys and constraints from a sample file.
  • When you already have a file and want the AI to work from it instead of starting from scratch.
  • Reuse it as often as you like: fill in the blanks (common queries) with new details and copy again.
  • With ChatGPT, Claude, Gemini and more, the AIs that support what this prompt needs.

How to use it

  1. Open chatgpt.com or claude.ai (or another AI listed here).
  2. Attach the file (PDF, Word, CSV or Excel), or paste its text into the prompt.
  3. Fill in the highlighted blank ([COMMON QUERIES]) below, or edit them after pasting.
  4. Copy the prompt, paste it into the chat and send.

Fill in the blanks (optional)

Prompt

Remix
Look at the attached spreadsheet and write a SQL schema for [DATABASE: PostgreSQL / MySQL / SQLite].

- One CREATE TABLE statement (or more if the data should be split into related tables; explain why).
- Sensible column names in snake_case, the right types, NOT NULL where the data is always present, and a primary key.
- Indexes worth adding for [COMMON QUERIES].
- An INSERT example using the first 3 rows.

Note any columns where the type is a judgment call.
One email a week

The best new prompts and personas, nothing else.

The Weekly is presented byyour brandSponsored · open

More Data prompts

Footer partner · openThis strip runs at the foot of every page. One partner at a time.Ask about it →