[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-05 (世界標準時間)。"],[],[],null,["# Fine-grained access control for sequences\n\nThis page explains how [fine-grained access control](/spanner/docs/fgac-about) works with\nSpanner sequences for GoogleSQL-dialect databases and PostgreSQL-dialect databases.\n\nFor fine-grained access control users, you can grant either one or both of the\nfollowing privileges to allow access to read sequence information or\ngenerate values from the sequence.\n\n- Grant `SELECT` on the sequence to allow read access to the parameters\n and current state of the sequence.\n\n ### GoogleSQL\n\n ```sql\n GRANT SELECT ON SEQUENCE SEQUENCE_NAME TO ROLE ROLE_NAME;\n ```\n\n ### PostgreSQL\n\n ```sql\n GRANT SELECT ON SEQUENCE SEQUENCE_NAME TO ROLE_NAME;\n ```\n- Grant `UPDATE` on the sequence to allow calls to the sequence value\n generator.\n\n ### GoogleSQL\n\n ```sql\n GRANT UPDATE ON SEQUENCE SEQUENCE_NAME TO ROLE ROLE_NAME;\n ```\n\n ### PostgreSQL\n\n ```sql\n GRANT UPDATE ON SEQUENCE SEQUENCE_NAME TO ROLE_NAME;\n ```\n\nRequired privileges for sequence operations\n-------------------------------------------\n\nThe following table contains details about which privileges you require when\nperforming a specific sequence operations.\n\nWhat's next\n-----------\n\n- Learn more about using [sequences](/spanner/docs/primary-key-default-value#bit-reversed-sequence) in Spanner.\n- Learn about `SEQUENCE` for [GoogleSQL](/spanner/docs/reference/standard-sql/data-definition-language#sequence_statements) or [PostgreSQL](/spanner/docs/reference/postgresql/data-definition-language#sequence_statements).\n- Learn about sequence functions in [GoogleSQL](/spanner/docs/reference/standard-sql/sequence_functions) or [PostgreSQL](/spanner/docs/reference/postgresql/functions-and-operators#sequence).\n- Learn about sequences in the `INFORMATION_SCHEMA` in [GoogleSQL](/spanner/docs/information-schema#sequences) or [PostgreSQL](/spanner/docs/information-schema-pg#sequences)."]]