> For the complete documentation index, see [llms.txt](https://dev117uday.gitbook.io/databases/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev117uday.gitbook.io/databases/sql/working-with-database.md).

# Database

## Creating a database

![image](https://4266709838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MguJ2NLZYzXs1aLLRCO%2Fuploads%2Fgit-blob-e45a304032be74bf102b4a471f456392e06687a4%2Fcreate-database.gif?alt=media)

## Dropping Database

![image](https://4266709838-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MguJ2NLZYzXs1aLLRCO%2Fsync%2Fc6c2ed1b6a941d662bdb68767a0522b23dc04c37.gif?generation=1628771051639290\&alt=media)

## Commands

```sql
create database testdb;

drop database if exists testdb;
```

### Connect to DB

```sql
-- using psql
\c test
```

### See list of tables

```sql
-- using psql
\d                       #to see tables
\d <name of table>       #to see details about table
```
