How Do You Create a Table in a Specific Database Using a SQL Front-End GUI Application?

Problem scenario
You are using a SQL front end to query a Postgres database.  (To view directions for installing a free front-end GUI application, click here.) You have run various commands to prove the connection to the database server works.  

Running this query

select version();


"PostgreSQL 9.5.6 on x86_64-pc-linux-gnu, compiled by ..."

You have used CREATE DATABASE successfully.  When you try "create schema epsilon" you get "Error: permission denied for database postgres."  You have a database called "theta."

You have tried using the "connect" word in your SQL queries.  You have tried expanding "public" to find the "theta" database using the GUI portion of my SQL front end.  But you cannot seem to create database-specific tables or schemas.

How do you create a table in a specific database from a SQL front end (GUI application)?

This assumes the SQL front end GUI application has connected to the Postgres database.  On the left-hand side, right click the database's name (under "public").    Go to CREATE NEW -> TABLE.  In the "Name" field type the desired name of the new table.  Use the "Add" button to add tables.  You can set the Datatype as desired.  The column names can be modified according to your desires.

Leave a comment

Your email address will not be published. Required fields are marked *