> For the complete documentation index, see [llms.txt](https://wasin-silakong.gitbook.io/corgidb-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wasin-silakong.gitbook.io/corgidb-docs/objects-package/class-table.md).

# class Table

corgidb.package.Table

Table class is for manipulating SQLite Table which can be generated in 2 ways

1. using CorgiDB.utils `create_table` or `get_table`
2. initialize the class Table manually by calling `corgidb.objects.Table`

However, if the table already exists it is highly recommended to create this object by using the first method

**Parameters**

1. **name: str**

   name of the Table on the database
2. **connection: sqlite3.Connection**

   connection to SQLite database using Python's sqlite3 module

**Examples**

```python
import sqlite3
from corgidb.objects import Table

connection = sqlite3.connect("db.sqlite")

tb = Table(name="Personnel", connection=connection)
```

**Notes**

the above method can be automated by using `get_table`

{% content-ref url="/pages/MNPuh4RfXyw22B1H5pUd" %}
[CorgiDB.utils.get\_table](/corgidb-docs/class-corgidb/corgidb.utils.get_table.md)
{% endcontent-ref %}
