Search
 
SCRIPT & CODE EXAMPLE
 

SQL

postgresql create query

CREATE TABLE COMPANY(
   ID INT PRIMARY KEY     NOT NULL,
   NAME           TEXT    NOT NULL,
   AGE            INT     NOT NULL,
   ADDRESS        CHAR(50),
   SALARY         REAL,
   JOIN_DATE	  DATE
);

INSERT INTO COMPANY (ID,NAME,AGE,ADDRESS,SALARY,JOIN_DATE) VALUES (1, 'Paul', 32, 'California', 20000.00,'2001-07-13');
INSERT INTO COMPANY (ID,NAME,AGE,ADDRESS,JOIN_DATE) VALUES (2, 'Allen', 25, 'Texas', '2007-12-13');
INSERT INTO COMPANY (ID,NAME,AGE,ADDRESS,SALARY,JOIN_DATE) VALUES (3, 'Teddy', 23, 'Norway', 20000.00, DEFAULT );
INSERT 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');
Comment

PREVIOUS NEXT
Code Example
Sql :: postgres json to string 
Sql :: drop df constraint sql server 
Sql :: postgresql casting integer to string 
Sql :: get current month last date in sql server 
Sql :: sql compare two tables for differences 
Sql :: sql server list locks 
Sql :: vbscript connect mssql 
Sql :: mysql case when or 
Sql :: how to login sql server using cmd 
Sql :: add column text sql after column 
Sql :: how to change a collumn name in sql 
Sql :: mysql utc timestamp 
Sql :: select first and last row sql 
Sql :: sql select into statement 
Sql :: pl/sql procedure example 
Sql :: postgresql get today 
Sql :: mysql terminal run sql file 
Sql :: kill a pid redshift 
Sql :: sql count number of rows after group by 
Sql :: mysql show schema 
Sql :: sql server alter table add column tinyint 
Sql :: how to combine diff colmun value using group by postgres 
Sql :: check index sql server 
Sql :: how to inner join 4 tables in sql 
Sql :: sql running total 
Sql :: oracle sql concatenate results into string 
Sql :: sql get inserted primary key 
Sql :: between sql 
Sql :: declare varchar sql server 
Sql :: mysql order by two columns priority 
ADD CONTENT
Topic
Content
Source link
Name
4+5 =