---
layout: post
title:  "Database commands cheat sheet"
teaser: Cheat sheet for various DB commands
date:   2017-08-21 17:04:00 +0000
categories: cheat-sheets
---

# PostgreSQL

## Connect via psql
```bash
$ psql -h <hostname> -p <port> -U <user> <db_name>
```

---
layout: post
title:  "Database commands cheat sheet"
teaser: Cheat sheet for various DB commands
date:   2017-08-21 17:04:00 +0000
categories: cheat-sheets
---

# PostgreSQL

## Connect via psql
```bash
$ psql -h <hostname> -p <port> -U <user> <db_name>
```

## Show tables - psql cli
```bash
\dt
```


Add command to show tables via psql
Add command to show tables via psql