# Configuring database variables

You can define variables to use in SQL and row count expressions

You configure variables from the **Settings** tab of a rule-based database. To display the **Settings** tab, click the database name.

## Adding a variable <a href="#variable-add" id="variable-add"></a>

To add a variable:

1. Click **Add Variable**.
2. In the **Name** field, provide the name of the variable.
3. In the **Value** field, provide the value of the variable.
4. Click the save icon.

## Editing a variable definition <a href="#variable-edit" id="variable-edit"></a>

To edit a variable definition:

1. Click the edit icon for the variable.
2. Update the name or value.
3. Click the save icon.

## Removing a variable <a href="#variable-remove" id="variable-remove"></a>

To remove a variable, click its delete icon.

## Referring to a variable <a href="#variable-use" id="variable-use"></a>

To refer to a variable in a SQL or row count expression, use `$VARIABLE_NAME`.
