article

Sunday, April 25, 2021

Download Install and Setup PostgreSQL on Windows 10 create database and table

Download Install and Setup PostgreSQL on Windows 10 create database and table

PostgreSQL: The World's Most Advanced Open Source Relational Database https://www.postgresql.org/

username :admin
password : admin

SELECT * FROM accounts;

INSERT INTO accounts (user_id, username, password, email, created_on, last_login)
VALUES('1','cairocoders','pass123', 'cairocoders@gmail.com', '2021-04-01', '2021-01-01');

SELECT username
FROM accounts
ORDER BY username DESC;

SELECT
user_id,
username
FROM
accounts
ORDER BY
user_id ASC,
username DESC;

SELECT
user_id,
username
FROM
accounts
WHERE
username = 'cairocoders';

SELECT
user_id,
username,
email
FROM
accounts
WHERE
username = 'cairocoders' AND 
    email = 'cairocoders@gmail.com';

SELECT
user_id,
username,
email
FROM
accounts
WHERE
username = 'cairocoders' OR 
    email = 'cairocoders@gmail.com';

Related Post