When you connect a Neon Postgres database to a Vercel project, you do not need a separate database client just to inspect your tables. You can view your database directly from the Vercel dashboard, use the Neon SQL Editor, or run standard PostgreSQL queries to inspect schemas, tables, columns, and rows.
This guide explains how to view Neon database tables using SQL, especially when your Neon database is connected to a Vercel project.
1. Understand Where Your Neon Database Lives
Neon is a serverless Postgres database. When you connect Neon to Vercel, your application connects to the database through environment variables such as DATABASE_URL.
Your database is not stored inside your Next.js app. The app only connects to the database using the connection string provided by Neon and configured in Vercel.
The basic flow looks like this:
Next.js App on Vercel
↓
DATABASE_URL
↓
Neon Postgres Database
So when you want to view your tables, you are not checking the application code directly. You are checking the actual Postgres database connected to your Vercel project.
2. View Neon Tables from the Vercel Dashboard
The easiest way is through the Vercel dashboard.
Go to:
Vercel Dashboard
→ Your Project
→ Storage / Marketplace Database
→ Neon
→ Query / Browser / Data Editor
From there, you can run SQL queries, view table data, inspect schemas, and manage your database directly from the dashboard.
To list all tables in the public schema, run:
SELECT table_name
FROM information_schema.tables
WHERE table_schema = 'public'
ORDER BY table_name;
Example result:
users
posts
comments
sessions
accounts
This shows the tables that exist inside your default public schema.
3. View Table Structure
After you know the table name, you can inspect its columns.
Use this query:
SELECT
table_name,
column_name,
data_type,
is_nullable,
column_default
FROM information_schema.columns
WHERE table_schema = 'public'
ORDER BY table_name, ordinal_position;
This query shows the table name, column name, data type, nullable status, and default value for each column.
To inspect a specific table, for example users, run:
SELECT
column_name,
data_type,
is_nullable,
column_default
FROM information_schema.columns
WHERE table_schema = 'public'
AND table_name = 'users'
ORDER BY ordinal_position;
This is useful when you want to confirm whether your migration created the correct columns.
4. View Table Data
To view rows from a table, run:
SELECT *
FROM users
LIMIT 50;
Always use LIMIT when checking production data. Without LIMIT, a large table can return too many rows and make the query slow.
For example, to view the latest posts:
SELECT *
FROM posts
ORDER BY created_at DESC
LIMIT 20;
This query shows the latest 20 posts, assuming the table has a created_at column.
5. Count Rows in a Table
To check how many rows exist in a table, run:
SELECT COUNT(*)
FROM users;
For multiple tables, you can run:
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM posts;
SELECT COUNT(*) FROM comments;
This is useful after running seed scripts, migrations, signup flows, or API insert operations.
6. Check the Current Database and Schema
Sometimes your tables do not appear because you are connected to the wrong database, branch, or schema.
Check the current database:
SELECT current_database();
Check the current schema:
SELECT current_schema();
Check all available schemas:
SELECT schema_name
FROM information_schema.schemata
ORDER BY schema_name;
Check all non-system tables:
SELECT
schemaname,
tablename,
tableowner
FROM pg_tables
WHERE schemaname NOT IN ('pg_catalog', 'information_schema')
ORDER BY schemaname, tablename;
This query is helpful because it does not only check the public schema. It shows tables across all non-system schemas.
7. Use Neon SQL Editor
You can also inspect your database directly from the Neon Console.
Go to:
Neon Console
→ Your Project
→ Branch
→ Database
→ SQL Editor
In the Neon SQL Editor, you can run standard SQL queries.
To list tables:
SELECT table_name
FROM information_schema.tables
WHERE table_schema = 'public'
ORDER BY table_name;
You can also use Postgres meta-commands if the editor supports them.
To list tables:
\dt
To inspect a specific table:
\d users
Important: commands like \dt and \d users are not normal SQL statements. They are psql meta-commands. They work in tools that support them, such as psql or Neon SQL Editor. If your SQL client does not support them, use information_schema queries instead.
8. Check Vercel Environment Variables
If your app works locally but not on Vercel, or if your dashboard shows an empty database, check your environment variables.
Go to:
Vercel Dashboard
→ Project
→ Settings
→ Environment Variables
Look for variables such as:
DATABASE_URL
POSTGRES_URL
PGHOST
PGUSER
PGDATABASE
PGPASSWORD
The most important one is usually:
DATABASE_URL
Your application uses this value to connect to Neon.
If your tables are missing, possible causes include:
- The app is connected to the wrong Neon branch.
- The production environment uses a different
DATABASE_URL. - The migration has not been deployed.
- The table exists in another schema.
- The local database and production database are different.
9. Common Debugging Queries
Use these queries when debugging a Neon database connected to Vercel.
List all tables:
SELECT table_name
FROM information_schema.tables
WHERE table_schema = 'public'
ORDER BY table_name;
List all columns:
SELECT
table_name,
column_name,
data_type
FROM information_schema.columns
WHERE table_schema = 'public'
ORDER BY table_name, ordinal_position;
View recent users:
SELECT *
FROM users
ORDER BY created_at DESC
LIMIT 20;
Check whether a table exists:
SELECT EXISTS (
SELECT 1
FROM information_schema.tables
WHERE table_schema = 'public'
AND table_name = 'users'
);
Check database name:
SELECT current_database();
Check active schema:
SELECT current_schema();
Check all non-system tables:
SELECT
schemaname,
tablename
FROM pg_tables
WHERE schemaname NOT IN ('pg_catalog', 'information_schema')
ORDER BY schemaname, tablename;
10. Best Practice for Production Databases
When checking production data, avoid running unsafe queries.
Use this:
SELECT *
FROM users
LIMIT 50;
Avoid this on large tables:
SELECT *
FROM users;
Be careful with destructive commands such as:
DELETE FROM users;
DROP TABLE users;
TRUNCATE TABLE users;
Before running destructive queries, confirm that you are connected to the correct environment, database, and branch.
For production debugging, start with read-only queries:
SELECT
id,
email,
created_at
FROM users
ORDER BY created_at DESC
LIMIT 20;
This gives you enough visibility without exposing or modifying unnecessary data.
Conclusion
To view Neon database tables in Vercel, the fastest method is to open the database from the Vercel dashboard and run SQL queries directly. You can also use the Neon Console SQL Editor for deeper inspection.
The most useful query is:
SELECT table_name
FROM information_schema.tables
WHERE table_schema = 'public'
ORDER BY table_name;
After that, inspect columns with information_schema.columns, view rows with SELECT * FROM table_name LIMIT 50, and verify your active database with SELECT current_database().
If tables do not appear, check your Neon branch, Vercel environment variables, schema, and migration status.


