# Querying by rowID in the API

**URL:** https://community.glideapps.com/t/querying-by-rowid-in-the-api/77182
**Category:** Ask for Help
**Created:** [October 18, 2024, 2:36pm UTC](https://community.glideapps.com/t/querying-by-rowid-in-the-api/77182 "2024-10-18T14:36:13Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Phillip\_Davis](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/phillip_davis/32/80871_2.png) [@Phillip\_Davis](https://community.glideapps.com/u/Phillip_Davis)
#### Post date: [October 18, 2024, 2:36pm UTC](https://community.glideapps.com/t/querying-by-rowid-in-the-api/77182/1 "2024-10-18T14:36:13Z")

</div>

I suppose I have two questions:

1. How do I query for this row (I have Big Table enabled)
2. How do (if it at all) should I use this rowID in my insertion calls?  
I tried the following query:

```auto
        sql = f"SELECT * FROM \"GLIDE_INTERNAL_TABLE_ID\" WHERE \"rowID\" = $1"
        query = {
            "sql": sql,
            "params": ["ROWID"]
        }

```

and got the response:

```auto
{'message': 'Unknown column rowID'}

```

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [October 18, 2024, 2:47pm UTC](https://community.glideapps.com/t/querying-by-rowid-in-the-api/77182/2 "2024-10-18T14:47:27Z")

</div>

If you want to see the RowID on your table, then you need to add a RowID column.

> **[Row ID Column | Glide Docs](https://www.glideapps.com/docs/automation/computed-columns/row-id-column)**
>
> Generate unique IDs for your rows.

---

<div class="post-metadata">

### Author: ![Phillip\_Davis](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/phillip_davis/32/80871_2.png) [@Phillip\_Davis](https://community.glideapps.com/u/Phillip_Davis)
#### Post date: [October 18, 2024, 6:09pm UTC](https://community.glideapps.com/t/querying-by-rowid-in-the-api/77182/3 "2024-10-18T18:09:27Z")

</div>

The problem was I didn’t query by $rowID. Assuming one has a SQL data store, the above code should work.

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [October 19, 2024, 3:50am UTC](https://community.glideapps.com/t/querying-by-rowid-in-the-api/77182/4 "2024-10-19T03:50:55Z")

</div>

Yeah, because rowIDs are referred to as $rowID as its “column name” when you query using Glide API.

---

<div class="post-metadata">

### Author: ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)
#### Post date: [October 26, 2024, 3:51am UTC](https://community.glideapps.com/t/querying-by-rowid-in-the-api/77182/5 "2024-10-26T03:51:54Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
