The syntax for creating a table in PostgreSQL is:

CREATE TABLE table_name (
column1 datatype,
column2 datatype,
column3 datatype,
….
);

Example:

CREATE TABLE products (
product_id INTEGER PRIMARY KEY,
product_name VARCHAR(255),
price DECIMAL(10,2)
);

Leave a Reply

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