# Defining and Editing SQL Statements

> Sisense makes it easy to edit custom tables. You can use SQL to customize the columns contained within a custom table.

*Source: https://docs.sisense.com/main/SisenseLinux/editing-sql-statements.htm*

---

Last updated: June 11, 2026

|  |  |
| --- | --- |
| [Tier](https://www.sisense.com/pricing/#pricing) | [Deployment](https://docs.sisense.com/main/SisenseLinux/introduction-to-sisense-cloud-managed-services.md#ComparisonofManagedCloudandSelfHosted) |
| Launch     Grow    Enterprise | Cloud     On-Prem |

Sisense makes it easy to edit custom tables. You can use SQL to customize the columns contained within a custom
table.

When you edit a custom table, any changes you make are saved when you click Save unless the expression did not
successfully parse. In this case, you are prompted to save a draft of the invalid expression.

![Invalid expression](https://docs.sisense.com/main/Resources/Images/invalid-expression.png)

If you save the invalid expression, Sisense continues to use the last valid expression that was saved when building
an ElastiCube , but the next time you open a preview of the table, the invalid expression will be displayed. This
allows you to continue building working ElastiCube s while letting you save incomplete expressions for later.

If you wish to display the last valid expression, you can click the Refresh button in the menu bar and then press
Save.

![Refresh button](https://docs.sisense.com/main/Resources/Images/refresh-button.png)

**To edit a custom table's SQL:**

1. Select the custom table you want to edit and click ![8 6v7preview](https://docs.sisense.com/main/Resources/Images/8-6v7preview.png).

   ![Preview](https://docs.sisense.com/main/Resources/Images/preview.png)

   The custom table area is displayed
2. Enter SQL statements to access tables and fields that exist in the schema. See related topics for more details on
   [SQL Quick Reference](https://docs.sisense.com/main/SisenseLinux/sql-reference.md) and [Data Functions for Custom Tables and Fields](https://docs.sisense.com/main/SisenseLinux/functions-overview.md).
3. To view results based on the SQL statement, click ![8 6v7preview](https://docs.sisense.com/main/Resources/Images/8-6v7preview31.png).

   **Note:**

   At least one build including the relevant base table must have been completed in order to preview results.
4. Click **Save** to save your changes.

## Tips

- Press Ctrl + Space to complete an SQL statement.
- To make it easier to access table fields, give the table name an alias, and reference the alias to bring up the
  related fields. For example Select A. From table as A.
- You can add comments in expressions by using the "-" for a single line or /.../ for blocks.
- A good reference on compatible SQL commands is available on [Microsoft MSDN](https://msdn.microsoft.com/en-us/library/bb510741).

**Note:**

Sisense does not support Boolean data types.
