---
url: /card-guides/sql-variable.md
description: >-
  SQL Variables can be used to store data fetched from a database table rather
  than a MODLR cube.
---

# SQL Variable

SQL Variables can be used to store data fetched from a database table rather than a MODLR cube.

## Common Use Properties

* **Query Property**
  The SQL Query to be ran.

* **Query Parameters Property**
  Only use if the SQL query entered in the Query Property is paramaterized with ?

  > **Example:** `select * from financial_transactions where id = ?`

  If so, then add as many items as there are ? parameters and enter the values accordingly (in order of ? appearance).

* **Datasource Property**
  The database to execute the query in.
