postgresql create query

Solutions on MaxInterview for postgresql create query by the best coders in the world

showing results for - "postgresql create query"
Matys
03 May 2020
1CREATE TABLE COMPANY(
2   ID INT PRIMARY KEY     NOT NULL,
3   NAME           TEXT    NOT NULL,
4   AGE            INT     NOT NULL,
5   ADDRESS        CHAR(50),
6   SALARY         REAL,
7   JOIN_DATE	  DATE
8);
9
10INSERT INTO COMPANY (ID,NAME,AGE,ADDRESS,SALARY,JOIN_DATE) VALUES (1, 'Paul', 32, 'California', 20000.00,'2001-07-13');
11INSERT INTO COMPANY (ID,NAME,AGE,ADDRESS,JOIN_DATE) VALUES (2, 'Allen', 25, 'Texas', '2007-12-13');
12INSERT INTO COMPANY (ID,NAME,AGE,ADDRESS,SALARY,JOIN_DATE) VALUES (3, 'Teddy', 23, 'Norway', 20000.00, DEFAULT );
13INSERT INTO COMPANY (ID,NAME,AGE,ADDRESS,SALARY,JOIN_DATE) VALUES (4, 'Mark', 25, 'Rich-Mond ', 65000.00, '2007-12-13' ), (5, 'David', 27, 'Texas', 85000.00, '2007-12-13');