PostgreSQL

PgSQL: Create table inside database

Example

 

CREATE TABLE c_ordernotes (
c_ordernotes_id numeric(10,0) CONSTRAINT firstkey PRIMARY KEY,
ad_client_id numeric(10,0) NOT NULL,
ad_org_id numeric(10,0) NOT NULL,
isactive character(1),
created timestamp DEFAULT current_timestamp,
createdby numeric(10,0),
updated timestamp DEFAULT current_timestamp,
updatedby numeric(10,0),
c_order_id numeric(10,0),
line numeric(10,0),
notes_name varchar(255),
notes_description varchar(2550)
);

Leave a Reply

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