# Listing all tables in a DB connection

**URL:** <https://forum.inductiveautomation.com/t/listing-all-tables-in-a-db-connection/45241>\
**Category:** Ignition\
**Tags:** scripting, database, ignition80\
**Created:** [April 3, 2021, 12:38pm UTC](https://forum.inductiveautomation.com/t/listing-all-tables-in-a-db-connection/45241 "2021-04-03T12:38:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vasanth.p](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/vasanth.p/32/38099_2.png) [@vasanth.p](https://forum.inductiveautomation.com/u/vasanth.p)\
**Post date:** [April 3, 2021, 12:38pm UTC](https://forum.inductiveautomation.com/t/listing-all-tables-in-a-db-connection/45241/1 "2021-04-03T12:38:28Z")

</div>

Is there a scripting function to list all the tables in a database connection .?

How to get all the table names listed in a Database Query Browser via scripting ?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [April 3, 2021, 3:04pm UTC](https://forum.inductiveautomation.com/t/listing-all-tables-in-a-db-connection/45241/2 "2021-04-03T15:04:12Z")

</div>

Not specifically scripting, but the SQL standard calls for DBs to implement the [information\_schema](https://www.postgresql.org/docs/current/information-schema.html) schema, with this kind of metadata. In the database query browser, start with this:

```auto
SELECT * FROM information_schema.tables

```

IIUC, you might get filtered responses if your connection credentials lack permissions.

---

<div class="post-metadata">

**Author:** ![vasanth.p](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/vasanth.p/32/38099_2.png) [@vasanth.p](https://forum.inductiveautomation.com/u/vasanth.p)\
**Post date:** [April 3, 2021, 4:03pm UTC](https://forum.inductiveautomation.com/t/listing-all-tables-in-a-db-connection/45241/3 "2021-04-03T16:03:44Z")

</div>

Exactly what I was looking for. Thanks.
