create a table postgresql code example
Example 1: postgres create table
-- Basic table creation
CREATE TABLE table_name(
column1 datatype,
column2 datatype,
column3 datatype,
.....
columnN datatype,
PRIMARY KEY( one or more columns )
);
Example 2: postgresql create table as select
CREATE TABLE films_recent AS
SELECT * FROM films WHERE date_prod >= '2002-01-01';