pgAdmin 4 can create a table in PostgreSQL without any SQL: you name the table, add its columns in a dialog, and pgAdmin writes the CREATE TABLE statement for you. Here’s how to create a table in pgAdmin 4, step by step.
Every screen on this page is real, from pgAdmin 4 9.19 with PostgreSQL 19 on macOS.
The Example
A small notebook keeps notes: each note has a title and the day it was written. You create a notes table with those two columns.
Step 1: Create a Test Database
Create a database named notebook for the example, as How to Create a Database in pgAdmin 4 shows. Then open notebook › Schemas › public in the Object Explorer.
Step 2: Open the Create Table Dialog
Right-click Tables and choose Create › Table…:

Step 3: Name the Table
On the General tab, type notes in Name. Owner and Schema are already filled in: the table belongs to postgres and goes into the public schema.

Step 4: Add the Columns
Open the Columns tab and click + to add a row. Type title under Name, then type text in Data type and choose text from the list. Click + again and add written_on with the type date:

The other boxes are optional. Length/Precision and Scale are for types such as varchar(n) and numeric(p,s), and the Not NULL? and Primary key? switches add rules to a column.
Step 5: Check the SQL
The SQL tab shows the statements pgAdmin will run:

The first is a CREATE TABLE with your two columns, in the public schema. The second makes postgres the table’s owner, as the General tab said.
Step 6: Save the Table
Click Save. The table appears under Tables. Open notes › Columns to see its columns:

Clean Up
To delete the example, right-click notebook and choose Drop:

pgAdmin asks first. Click Drop:

Warning: Dropping a database deletes it and every table in it, and it can’t be undone.
Common Mistakes
| Mistake | What happens | Do this instead |
|---|---|---|
| Leaving Name empty on the General tab | pgAdmin shows 'Name' cannot be empty. and keeps Save greyed out. | Type the table’s name on the General tab. |
| Adding a column row without a name or a type | pgAdmin shows 'Name in Columns' cannot be empty. or 'Data type in Columns' cannot be empty. | Fill in both, or delete the row with its bin icon. |
| Right-clicking Tables under the wrong database | The table is created in that database. | Open the right database’s Schemas › public first. |
FAQ
Can I see a table’s SQL later?
Yes. Select the table in the Object Explorer and open the SQL tab on the right: it shows the statement that creates the table.
How do I create a table with SQL instead?
Run CREATE TABLE in psql or in pgAdmin’s Query Tool. Part 6 of the PostgreSQL Tutorial creates three tables that way.
Conclusion
In pgAdmin 4, right-click Tables, choose Create › Table…, name the table, add its columns on the Columns tab and click Save. The SQL tab shows the CREATE TABLE statement it runs.
Additional Resources
- pgAdmin 4 documentation: Table Dialog (opens in a new tab)
- PostgreSQL 19 documentation: CREATE TABLE (opens in a new tab)
Related
- PostgreSQL Tutorial — Part 6: Create Tables
- How to Describe a Table in PostgreSQL
- How to List Tables in PostgreSQL
Postgres, PostgreSQL and the Slonik Logo are trademarks or registered trademarks of the PostgreSQL Community Association of Canada, and used with their permission.
0 comments