Guide

Create table

Overview

Supabase is a PostgreSQL-based backend platform that allows you to build scalable applications by managing databases through an intuitive visual interface. Creating tables is a foundational task—tables are where your application stores all structured data, organized into columns (fields) and rows (records), similar to a spreadsheet. This workflow guides you through the table creation process using Supabase's visual Table Editor, allowing you to define the schema without writing SQL. By setting up columns with specific data types and default values at creation time, you ensure data consistency and reduce the need for application-level validation logic.

Before you begin

  • Active Supabase account (free tier at supabase.com is sufficient)
  • An existing Supabase project created and accessible in the dashboard
  • Appropriate project permissions to create tables (typically granted by default to project owners)

Step by step

1
ClickNew table

Begin creating a new table by clicking the 'New table' button in the Supabase dashboard. This action opens the table creation dialog where you will define the table's name and initial structure.

Tip. The 'New table' button is typically located in the Tables section of the left sidebar or at the top of the tables list.
Step 1
2
TypeName

Enter the desired name for your table in the 'Name' field. Choose a descriptive, lowercase name (following PostgreSQL conventions) that clearly represents the data the table will store, such as 'users', 'products', or 'orders'.

Tip. Table names should be lowercase, use underscores for multi-word names (e.g., 'user_profiles' instead of 'UserProfiles'), and avoid SQL reserved keywords.
3
ClickAdd column

Click the 'Add column' button to begin defining columns for your table. This creates a new column entry in the table schema where you can specify the column name, data type, and optional default value.

Step 3
4
ClickColumn name

Click on the 'Column name' input field to activate it for editing. This field is where you will type the name of your first custom column.

Step 4
5
TypeColumn name

Type the name of your column in the 'Column name' field. Use a descriptive, lowercase name that indicates the data it will hold, such as 'email', 'title', or 'description'.

Tip. Like table names, column names should follow PostgreSQL conventions: lowercase, underscores for multi-word names, and avoiding reserved keywords.
6
ClickChoose a column type...

Click on the 'Choose a column type...' dropdown to open the data type selector. This allows you to select the appropriate PostgreSQL data type for your column.

Step 6
7
Typecombobox

Type 'text' in the column type dropdown to filter the available data types and quickly locate the text option. Supabase will narrow the list as you type.

Tip. You can also scroll through the dropdown without typing, but typing is faster for finding common types like text, integer, or boolean.
8
Clicktext Variable-length character string

Click on the 'text Variable-length character string' option from the dropdown to select the text data type for your column. This data type is suitable for storing strings of any length, such as names, emails, or descriptions.

Tip. The text data type in PostgreSQL (via Supabase) has no enforced length limit, making it ideal for flexible string storage. For fixed-length strings or performance optimization, consider char(n) or varchar(n) alternatives.
Step 8
9
ClickColumn default value

Click on the 'Column default value' input field to activate it. This field allows you to specify a value that will automatically be assigned to this column if no value is provided when a new row is inserted.

Step 9
10
TypeColumn default value

Type the desired default value for your column in the 'Column default value' field. For text columns, enter a string value (such as 'Pending' or 'Unknown') that makes sense as a fallback when no value is explicitly provided during data insertion.

Tip. Default values are optional; leave this field empty if you do not want a default. For text columns, ensure the value is appropriate to your use case and won't cause unexpected behavior in your application.
11
ClickSave ⌘ ↵

Click the 'Save ⌘ ↵' button to create the table with the specified name, column, data type, and default value. This action commits the table schema to your Supabase database.

Tip. You can use the keyboard shortcut (Cmd+Enter on Mac, Ctrl+Enter on Windows/Linux) instead of clicking the button to save faster.
Warning. This action is final—the table will be created immediately in your PostgreSQL database. Ensure all details are correct before saving. If you need to modify the table afterward, you can edit it through the table detail view, but structure changes may require migration of existing data.
Step 11

Confirm it worked

  1. 1The new table appears in the Tables list in the left sidebar of the Supabase dashboard
  2. 2The table detail view displays your created column with the correct name, data type (text), and default value
  3. 3No error message appears after clicking Save; the page remains stable and shows the table schema

Common issues

Keep reading