PostgreSQL
PostgreSQL is a free open-source database system that supports both relational (SQL) and non-relational (JSON) queries.PostgreSQL is a back-end database for dynamic websites and web applications.In first postgreSQL name is Ingres --> Interactive Graphics and Research.
Installation
sudoapt update
It is a command used in linux to install, update and mange software packages.sudo means superuser do, i.e., running a command with admin rights. apt means advanced package tool like playstore.
sudo apt install postgresql postgresql - contrib
Check if postgreSQL is successfully installed. Open terminal then run these commands.
sudo -i -u postgres
i means login shell, u means user.
\h means help
\l means list the database
\r means stop
Esc-shift-:q means quit
\c means connect
To see the postgres version
select version();
select current-date;
create table employee(empid integer,name varchar(25),designation varchar(25),dept varchar(25),salary integer();
insert into employee values (123,'vasan','software developer','db',25000);
insert into employee values (124,'aadhi','software developer','AI',27000);
select * from employee;
Top comments (0)