Postgres connect command

psql -h example.com -U root -d postgres

-h = hostname
-U = Username
-d = database

It will ask for a password.

  1. List Database
\l

2.Connect to database

\c database_name

3. List tables

\dt

4. Select and delete

select * from basicauth_credentials where username = '[email protected]';

delete from basicauth_credentials where username = '[email protected]';

Published by

Leave a Reply

Your email address will not be published. Required fields are marked *