Ubuntu 16.04 Postgresql Installation and Restore SQL Dump

sudo apt-get install postgresql
sudo -u postgres -i
psql CREATE DATABASE dbname;
psql dbname < directory/data_backup.sql

\l --> list all database
\c dbname;  --> select database to use
\d+ --> list properties of the database
\d tablename describe table;

SELECT * FROM tablename WHERE column1 = 'asd' AND column2 = 'bcd';

:q --> quit from query
Yorum yaz

0 Yorumlar.

Yorum Yap


Not - Bunları KullanabilirsinizHTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>