The syntax for creating a table in PostgreSQL is as follows:

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

Example:
CREATE TABLE users (
id INTEGER PRIMARY KEY,
username VARCHAR(50) NOT NULL,
email VARCHAR(50) NOT NULL,
password VARCHAR(50) NOT NULL
);

Leave a Reply

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