Maintained with ☕️ by
IcePanel logo

Spanner supports the UUID data type for both GoogleSQL and PostgreSQL-dialect databases

Share

Services

## Feature Feature Spanner supports the `UUID` data type for both GoogleSQL and PostgreSQL-dialect databases. This data type stores universally unique identifiers (UUIDs) as 128-bit values. You can use the GoogleSQL[NEW\_UUID()](https://cloud.google.com/spanner/docs/reference/standard-sql/utility-functions#new%5Fuuid)function or the PostgreSQL[gen\_random\_uuid()](https://cloud.google.com/spanner/docs/reference/postgresql/functions#utility) to function to create UUID values. For more information, see[Use a universally unique identifier (UUID)](https://cloud.google.com/spanner/docs/schema-design#uuid%5Fprimary%5Fkey).