Basic syntax of CREATE TABLE statement is as follows CREATE TABLE tablename( columndatatype, columndatatype, columndatatype. ColumnN datatype, PRIMARY KEY( one or more columns ). PostgreSQL - CREATE Table - Tutorialspoint The PostgreSQL CREATE TABLE statement is used to create a new table in any of the given database. PostgreSQL CREATE TABLE AS Statement By In addition, the CREATE TABLE AS statement provides a superset of functionality offered by the SELECT INTO statement.
This is an extension from the SQL standar which does not allow zero-column tables. Example: PostgreSQL Create DB and Table - Example of how to create a database, user, role, table, and insert records into a postgresql database.
PostgreSQL: Documentation: : CREATE TABLE
This command will create a database from PostgreSQL shell prompt, but you should have appropriate privilege to create a database. To create a new table in PostgreSQL, you use the CREATE TABLE statement.