--- id: mssql title: MS SQL Server / Azure SQL Databases --- ToolJet can connect to MS SQL Server & Azure SQL databases to read and write data.
### Connection Options
You can add optional configurations in **key-value pairs** for the MS SQL data source connection.
#### Example:
| Key | Value |
|:------------------------|:--------|
| trustServerCertificate | true |
These options allow you to fine-tune the connection, such as enabling encryption when using a self-signed certificate.
### Enabling Encryption with a Self-Signed Certificate
To enhance security during data transfer, encryption can be enabled even with a self-signed certificate.
#### Server-Side Configuration
1. **Create and Install a Self-Signed Certificate:**
- Generate a self-signed certificate and install it on the SQL Server instance.
2. **Force Encryption:**
- Configure the SQL Server instance to force encrypted connections.
- For Azure SQL databases, turn on the **Encryption** toggle in the Azure portal.
#### Client-Side Configuration
1. Set the connection option `trustServerCertificate` to `true`.
- This bypasses certificate chain validation and is necessary when using a self-signed certificate.
### Parameterized Queries
ToolJet offers support for parameterized SQL queries, which enhance security by preventing SQL injection and allow for dynamic query construction. To implement parameterized queries:
1. Use `:parameter_name` as placeholders in your SQL query where you want to insert parameters.
2. In the **Parameters** section below the query editor, add key-value pairs for each parameter.
3. The keys should match the parameter names used in the query (without the colon).
4. The values can be static values or dynamic values using the `{{ }}` notation.
:::tip
Query results can be transformed using transformations. Read our transformations documentation to see how: [link](/docs/tutorial/transformations)
:::