> For the complete documentation index, see [llms.txt](https://docs.dwh.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dwh.dev/snowflake-sql-syntax-and-behavior/identifiers.md).

# Identifiers

## Basic Syntax ([Youtube](https://youtu.be/RIfgdpIOA3Q))

**Snowflake** provides an extensive toolkit for working with object and column identifiers. Let's start with the basics: identifiers with and without quotes ([documentation](https://docs.snowflake.com/en/sql-reference/identifiers-syntax))

Even at this stage, we won't achieve full compatibility with the syntax of other databases. However, two nuances deserve special attention:

* Identifiers without quotes are converted to uppercase.
* Identifiers within backticks behave similarly.

```sql
CREATE TABLE `Myidentifier` (
  f5 INT
);

CREATE TABLE "quote""andunquote""" (
  f6 INT
);
```

We collected all the varieties of the basic syntax [in 1.identifiers.1.sql](https://github.com/dwh-dev/data-lineage-challenge/blob/main/snowflake/1.identifiers/sql/1.identifiers.1.sql)

Here is the [**Dwh.dev**](https://dwh.dev/) result:

<figure><img src="/files/izg2pgxMAbH2tOEDOSi8" alt=""><figcaption></figcaption></figure>

## Special syntax ([Youtube](https://youtu.be/hGf2VtBxzHU))

In addition to the basic syntax, **Snowflake** has special functionality:

* [Literals and Variables as Identifiers](https://docs.snowflake.com/en/sql-reference/identifier-literal). A special **IDENTIFIER()** function to get a reference to an object or column from a session variable or string.
* [Table Literals](https://docs.snowflake.com/en/sql-reference/literals-table) Special function **TABLE()** to get a reference to an object from a session variable or string.
* [Double-Dot Notation](https://docs.snowflake.com/en/sql-reference/name-resolution#resolution-when-schema-omitted-double-dot-notation) A special syntax that allows the **PUBLIC** scheme to be omitted when addressing an object.

```sql
CREATE VIEW V1 AS
  SELECT * 
  FROM
    identifier($table_var1)
;

-- Column Identifier
CREATE VIEW V4 AS
  SELECT identifier('DEMO_DB.SCH1.T1.V1'):json_prop as prop 
  FROM 
    DEMO_DB.SCH1.T1
;

-- Double-Dot Notation
CREATE VIEW V8 AS
  SELECT * 
  FROM
    DEMO_DB..T3
;
```

This syntax is often found in the description of transformations because it helps to use the same source code with different object names.

We have collected all kinds of special syntax [in 1.identifiers.2.sql](https://github.com/dwh-dev/data-lineage-challenge/blob/main/snowflake/1.identifiers/sql/1.identifiers.2.sql).

Here is the [**Dwh.dev**](https://dwh.dev/) result:

<figure><img src="/files/XZ6RG7A44qa8nytHNBuh" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.dwh.dev/snowflake-sql-syntax-and-behavior/identifiers.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
