# How to apply SQL query on docker

**URL:** https://discuss.tryton.org/t/how-to-apply-sql-query-on-docker/3189
**Category:** System Administrator
**Created:** [September 4, 2020, 7:19pm UTC](https://discuss.tryton.org/t/how-to-apply-sql-query-on-docker/3189 "2020-09-04T19:19:03Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![dave](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/d/ee7513/32.png) [@dave](https://discuss.tryton.org/u/dave)
#### Post date: [September 4, 2020, 8:32pm UTC](https://discuss.tryton.org/t/how-to-apply-sql-query-on-docker/3189/2 "2020-09-04T20:32:55Z")

</div>

> [@herrdeh](#):
>
> I guess the above are command lines

The migration items that start with [SQL] are SQL queries, you need to run them on your database.

I’m guessing that [pgAdmin query tool](https://www.pgadmin.org/docs/pgadmin4/development/query_tool.html) will allow you to run the queries on the database, otherwise you can use _psql_ in your postgres docker container:

```
sudo docker exec [ID-of-postgres-container] psql -U postgres -d [name-of-database]

```

Then at the prompt type in the query.

Hope that helps?!

---

_[View the full topic](https://discuss.tryton.org/t/how-to-apply-sql-query-on-docker/3189)._
