mirror of
https://github.com/ToolJet/ToolJet
synced 2026-04-22 22:17:55 +00:00
* add date with time column * add table component to date with time colum * add aggregate and group by * add docs for retry on network error * add cookies * add .env vars * add docs for v2.65.0 * remove banner from v2.65.0 * update data types title * update querying data title
110 lines
No EOL
4.6 KiB
Markdown
110 lines
No EOL
4.6 KiB
Markdown
---
|
|
id: querying-tooljet-db
|
|
title: Querying Data
|
|
---
|
|
|
|
Querying the ToolJet database is as easy as querying any other data source on ToolJet.
|
|
|
|
- Go to the **Query panel**, and click on the **+Add** button to add a new query, and select **ToolJet Database**
|
|
<div style={{textAlign: 'center'}}>
|
|
|
|
<img className="screenshot-full" src="/img/v2-beta/database/newui/qtjdb.png" alt="ToolJet Database editor" />
|
|
|
|
</div>
|
|
|
|
- Select the table you want to query and the operation from the dropdown, then enter the required parameters for the selected operation. Click on the **Run** button to execute the query.
|
|
|
|
<div style={{textAlign: 'center'}}>
|
|
|
|
<img className="screenshot-full" src="/img/v2-beta/database/newui/qtjdb2.png" alt="ToolJet Database editor" />
|
|
|
|
</div>
|
|
|
|
|
|
<div style={{paddingTop:'24px', paddingBottom:'24px'}}>
|
|
|
|
## Available Operations
|
|
|
|
<div style={{paddingTop:'24px', paddingBottom:'24px'}}>
|
|
|
|
### List Rows
|
|
This operation returns all the records from the table.
|
|
|
|
#### Optional Parameters
|
|
- **Filter**: Add a condition by choosing a column, an operation, and the value for filtering the records.
|
|
- **Sort**: Sort the query response by choosing a column and the order (ascending or descending).
|
|
- **Limit**: Limit the number of records to be returned by entering a number.
|
|
|
|
</div>
|
|
|
|
<div style={{paddingTop:'24px', paddingBottom:'24px'}}>
|
|
|
|
### Create row
|
|
This operation creates a new record in the table. You can create a single record or multiple records at once.
|
|
|
|
#### Required Parameters
|
|
- **Columns**: Choose the columns, add values for the new record, and enter the values. You can also add a new column by clicking on the **+Add column** button.
|
|
|
|
</div>
|
|
|
|
<div style={{paddingTop:'24px', paddingBottom:'24px'}}>
|
|
|
|
### Update Row
|
|
This operation updates a record in the table. You can update a single record or multiple records at once.
|
|
|
|
#### Required Parameter
|
|
- **Filter**: Add a condition by choosing a column, an operation, and the value for updating a particular record.
|
|
- **Columns**: Choose the columns, update the values for the selected record, and enter the values.
|
|
|
|
</div>
|
|
|
|
<div style={{paddingTop:'24px', paddingBottom:'24px'}}>
|
|
|
|
### Delete Row
|
|
This operation deletes a record in the table. You can delete a single record or multiple records at once.
|
|
|
|
#### Required Parameters
|
|
- **Filter**: Add a condition by selecting a column, an operation, and the value to delete a specific record.
|
|
- **Limit**: Limit the number of records to be deleted by entering a number.
|
|
|
|
</div>
|
|
|
|
<div style={{paddingTop:'24px', paddingBottom:'24px'}}>
|
|
|
|
### Join Tables
|
|
|
|
You can join two or more tables in the ToolJet database by using the **Join** operation.
|
|
|
|
#### Required Parameters
|
|
- **From**: In the From section, the following parameters are available:
|
|
- **Selected Table**: Select the table from which you want to join the other table.
|
|
- **Type of Join**: Select the type of join you want to perform. The available options are: `Inner Join`, `Left Join`, `Right Join`, and `Full Outer Join`.
|
|
- **Joining Table**: Select the table that you want to join with the selected table.
|
|
- **On**: Select the column from the **selected table** and the **joining table** on which you want to join the tables. Currently, only `=` operation is supported for joining tables.
|
|
- **AND or OR condition**: You can add multiple conditions by clicking on the **+Add more** button below each join. The conditions can be joined by `AND` or `OR` operation.
|
|
|
|
<div style={{textAlign: 'center'}}>
|
|
|
|
<img className="screenshot-full" src="/img/v2-beta/database/newui/join1.png" alt="ToolJet Database editor" />
|
|
|
|
</div>
|
|
|
|
- **Filter**: Add a condition by choosing a column, an operation, and the value for filtering the records. The operations supported are same as the [filter operations](/docs/tooljet-db/database-editor#available-operations-are) for the **List rows** operation.
|
|
- **Sort**: Sort the query response by choosing a column and the order (ascending or descending).
|
|
- **Limit**: Limit the number of records to be returned by entering a number.
|
|
- **Offset**: Offset the number of records to be returned by entering a number. This parameter is used for pagination.
|
|
- **Select**: Select the columns that you want to return in the query response. By default, all the columns are selected.
|
|
|
|
<div style={{textAlign: 'center'}}>
|
|
|
|
<img className="screenshot-full" src="/img/v2-beta/database/newui/join2.png" alt="ToolJet Database editor" />
|
|
|
|
</div>
|
|
|
|
:::info
|
|
If you have any other questions or feedback about **ToolJet Database**, please reach us out at hello@tooljet.com or join our **[Slack Community](https://www.tooljet.com/slack)**
|
|
:::
|
|
|
|
</div>
|
|
|
|
</div> |