How to DROP a table from a specific SCHEMA in POSTGRES?

1k views Asked by At

I am using Heroku, and Postgres database.

I somehow have same table but in two different schemas, first one in public, second one in a custom schema I called mySchema. I need to drop the table which is in Public schema.

Should I put the schema name before the table and it will work ? heroku pg:psql -c "DROP TABLE public.myTable;" -a myAppInHeroku

1

There are 1 answers

0
Sushi On

I just did heroku pg:psql -c "DROP TABLE public.myTable;" -a myAppInHeroku and it removed the table from the public schema as I wanted.