PostgreSQL Create Table can be created using pgAdmin3. And these pgAdmin is a graphical interface, that provides the user to easily understand and to access the database features conveniently.
PostgreSQL Create Table Database Example
Description
By viewing the below steps of PostgreSQL Create Table, the concept of creating a table into the postgreSQL database can be easily understand.
Step - 1
In postgreSQL, a database by name SQLDB has been created.
Step - 2
For creating PostgreSQL Create Table, expand SQLDB and it display a list of collections.
Step - 3
From the collections expand schemas and it will display public collections.
Step - 4
Expand public it will display public related collections.
Step - 5
Right click on tables and select New Tables.
Step - 6
And mention the New Table name as Employee.
Step - 7
Click on columns and click Add button for inserting new columns names.
Step - 8
Creating the first column as emp_id with datatype as integer. And click on Ok button.
Step - 9
Column name emp_id as been successfully inserted and click on Add button for adding another column name.
Step - 10
Creating the second column as name with datatype as character varying. And click on Ok button.
Step - 11
Column name Name as been successfully inserted and click on Add button for adding another column name.
Step - 12
Creating the third column as Age with datatype as integer. And click on Ok button.
Step - 13
Column name Age as been successfully inserted and click on Add button for adding another column name Or click on Ok button then it will display all the three column names of the tables.
Step - 14
Table name employee as been successfully created.
Step - 15
Expand Tables then employee table will get displayed.
Step - 16
Expand employee then list of collections will get displayed.
Step - 17
Expand columns then the column names get displayed.
Step - 18
Right click on Employee table and select scripts followed by Insert script.
Step - 19
Inserting first employee values and click on execute the query.
Step - 20
Inserting second employee values and click on execute the query.
Step - 21
Inserting third employee values and click on execute the query.
Step - 22
Again right click on Employee table, and select View Data followed by View Top 100 Rows.
Step - 23
Then it will display all the column values like emp_id, Name and Age of all employees.
Summary
Key Points
PostgreSQL Creating the tables - Means creating a new table in the database server.
PostgreSQL Creating the tables - Can also be performed in command prompt.