> For the complete documentation index, see [llms.txt](https://docs.tonic.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tonic.ai/app/generation/generators/generator-characteristics/generators-uniqueness-constraints.md).

# Supporting uniqueness constraints

A column that has a uniqueness constraint must have a unique value for every record.

Primary key columns automatically require uniqueness. Uniqueness can also be required for other columns. For example, in a `users` table, `userid` is the primary key column, but `username` also must be unique.

The following generators can be used with columns that have uniqueness constraints:

* [Alphanumeric String Key](/app/generation/generators/generator-reference/alphanumeric-string-key.md)
* [ASCII Key](/app/generation/generators/generator-reference/ascii-key.md)
* [Character Substitution](/app/generation/generators/generator-reference/character-substitution.md)
* [Conditional](/app/generation/generators/generator-reference/conditional.md)
* [Finnish Personal Identity Code](/app/generation/generators/generator-reference/finnish-personal-identity-code.md)
* [FNR](/app/generation/generators/generator-reference/fnr.md)
* [Geo](/app/generation/generators/generator-reference/geo.md)
* [IBAN](/app/generation/generators/generator-reference/iban.md)
* [Integer Key](/app/generation/generators/generator-reference/integer-key.md)
* [Null](/app/generation/generators/generator-reference/null.md)
* [Numeric String Key](/app/generation/generators/generator-reference/numeric-string-key.md)
* [Passthrough](/app/generation/generators/generator-reference/passthrough.md)
* [Random UUID](/app/generation/generators/generator-reference/random-uuid.md)
* [Regex Mask](/app/generation/generators/generator-reference/regex-mask.md)
* [Sequential Integer](/app/generation/generators/generator-reference/sequential-integer.md)
* [SIN](/app/generation/generators/generator-reference/sin.md)
* [Unique Email](/app/generation/generators/generator-reference/unique-email.md)
* [URL](/app/generation/generators/generator-reference/url.md)
* [UUID Key](/app/generation/generators/generator-reference/uuid-key.md)


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.tonic.ai/app/generation/generators/generator-characteristics/generators-uniqueness-constraints.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
