Question: how to create database and table in postgres?
Answer: First, you specify the name of the new table after the CREATE TABLE clause. ...  Next, you list the column name, its data type, and column constraint. ...  Then, after the column list, you define a table-level constraint that defines rules for the data in the table.