# Identifier Qualifiers

Qualifiers are used within SQL statements to reference data structures, such as databases, tables, or columns. For example, typically a `SELECT` query contains references to some columns and at least one table.

Qualifiers can be composed by one or more [identifiers](/docs/server/reference/sql-structure/sql-language-structure/identifier-names.md), where the initial parts affect the context within which the final identifier is interpreted:

* For a database, only the database identifier needs to be specified.
* For objects which are contained in a database (like tables, views, functions, etc.) the database identifier can be specified. If no database is specified, the current database is assumed (see [USE](/docs/server/reference/sql-statements/administrative-sql-statements/use-database.md) and [DATABASE()](/docs/server/reference/sql-functions/secondary-functions/information-functions/database.md) for more details). If there is no default database and no database is specified, an error is issued.
* For column names, the table and the database are generally obvious from the context of the statement. It is however possible to specify the table identifier, or the database identifier plus the table identifier.
* An identifier is fully-qualified if it contains all possible qualifiers, for example, the following column is fully qualified: `db_name.tbl_name.col_name`.

If a qualifier is composed by more than one identifier, a dot (.) must be used as a separator. All identifiers can be quoted individually. Extra spacing (including new lines and tabs) is allowed.

All the following examples are valid:

* db\_name.tbl\_name.col\_name
* tbl\_name
* `db_name`.`tbl_name`.`col_name`
* `db_name` . `tbl_name`
* db\_name. tbl\_name

If a table identifier is prefixed with a dot (.), the default database is assumed. This syntax is supported for ODBC compliance, but has no practical effect on MariaDB. These qualifiers are equivalent:

* tbl\_name
* . tbl\_name
* .`tbl_name`
* . `tbl_name`

For DML statements, it is possible to specify a list of the partitions using the PARTITION clause. See [Partition Pruning and Selection](/docs/server/server-usage/partitioning-tables/partition-pruning-and-selection.md) for details.

## See Also

* [Identifier Names](/docs/server/reference/sql-structure/sql-language-structure/identifier-names.md)
* [USE](/docs/server/reference/sql-statements/administrative-sql-statements/use-database.md)
* [DATABASE()](/docs/server/reference/sql-functions/secondary-functions/information-functions/database.md)

<sub>*This page is licensed: CC BY-SA / Gnu FDL*</sub>

{% @marketo/form formId="4316" %}


---

# Agent Instructions: 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:

```
GET https://mariadb.com/docs/server/reference/sql-structure/sql-language-structure/identifier-qualifiers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
