> ## Documentation Index
> Fetch the complete documentation index at: https://docs.e6data.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SQL overview

> Unified accepts Spark-style SQL with documented engine and connector restrictions. The same language is available through Workbench, SQL notebook cells, and live reference examples

ReferenceApplies to: Unified engine deployments

Unified accepts Spark-style SQL with documented engine and connector restrictions. The same language is available through Workbench, SQL notebook cells, and live reference examples. Familiar syntax from another SQL system does not establish compatibility by itself.

## Statement structure

Submit a single statement or use an example script that submits its statements in order. A semicolon terminates a statement. String literals, quoted identifiers, and comments can contain semicolons without separating statements.

| Element | Form | Meaning |
| - | - | - |
| Identifier | `item`, `i_item_sk` | An object or column name |
| Quoted identifier | `` `item-key` `` | An identifier containing punctuation or a reserved word |
| Qualified table | `catalog.namespace.table` | Explicit data location |
| String literal | `'Books'` | Text; escape an apostrophe by doubling it |
| Line comment | `-- explanation` | Comment through end of line |
| Block comment | `/* explanation */` | Comment between delimiters |
| Alias | `expression AS name` | Output name or source abbreviation |

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT i_item_sk AS item_key,
       i_item_id AS item_code,
       'It''s SQL' AS description
FROM demo.tpcds.item
ORDER BY i_item_sk
LIMIT 5;
```

## Names and context

A session has a current catalog and namespace. An unqualified table uses that context; a fully qualified name names the destination explicitly. Table aliases shorten column references and resolve ambiguous names in joins. Function names and aliases are matched without ASCII case sensitivity. The session setting `spark.sql.caseSensitive` controls supported identifier matching.

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
USE CATALOG demo;
USE tpcds;
SELECT i_item_sk, i_category FROM item ORDER BY i_item_sk LIMIT 5;
```

## Results and table changes

A SELECT returns rows. Metadata commands return descriptions or status. Writes and maintenance can compute or prepare output before their table commit is confirmed. Inspect the operation's execution and write outcome rather than treating acceptance as completion.

## Reference notation

Syntax forms in prose use square brackets for optional parts and descriptive names such as `expression` or `table_name`. Runnable SQL blocks use `demo.tpcds` for sample tables and `demo.examples` for the write lab. Replace these names with your catalog and namespace.

| Area | Continue |
| - | - |
| SELECT and clauses | [Queries](https://docs.e6data.com/transformation/sql/queries.md) |
| Data types, casts, and expressions | [Types and expressions](https://docs.e6data.com/transformation/sql/expressions.md) |
| Functions, signatures, and aliases | [Functions](https://docs.e6data.com/transformation/sql/functions.md) |
| DDL and commands | [Statements](https://docs.e6data.com/transformation/sql/statements.md) |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.