-- Returns metadata for the specified project and region.SELECT*FROMmyProject.`region-us`.INFORMATION_SCHEMA.TABLES;-- Returns metadata for the specified project and dataset.SELECT*FROMmyProject.myDataset.INFORMATION_SCHEMA.TABLES;
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-07-09。"],[[["\u003cp\u003e\u003ccode\u003eINFORMATION_SCHEMA\u003c/code\u003e views in BigQuery are read-only, system-defined views that provide metadata about BigQuery objects.\u003c/p\u003e\n"],["\u003cp\u003eThese views support dataset, region, and project qualifiers to restrict results to a specific scope, and if neither a region nor dataset qualifier is specified, an error will occur.\u003c/p\u003e\n"],["\u003cp\u003eQueries against \u003ccode\u003eINFORMATION_SCHEMA\u003c/code\u003e views incur a minimum of 10 MB of data processing charges for on-demand pricing, or consume capacity for projects using capacity-based pricing, and are not cached.\u003c/p\u003e\n"],["\u003cp\u003eThe views do not contain information about hidden datasets, and permissions are checked at the parent level, not at the individual row level.\u003c/p\u003e\n"],["\u003cp\u003eAll \u003ccode\u003eINFORMATION_SCHEMA\u003c/code\u003e views must use GoogleSQL syntax, and they are not supported in legacy SQL, nor in DDL statements.\u003c/p\u003e\n"]]],[],null,["# Introduction to INFORMATION_SCHEMA\n==================================\n\nThe BigQuery `INFORMATION_SCHEMA` views are read-only, system-defined\nviews that provide metadata information about your BigQuery\nobjects. The following table lists all `INFORMATION_SCHEMA` views that you can\nquery to retrieve metadata information:\n\n^†^ For `*BY_PROJECT` views, the `BY_PROJECT` suffix is optional. For\nexample, querying `INFORMATION_SCHEMA.JOBS_BY_PROJECT` and `INFORMATION_SCHEMA.JOBS`\nreturn the same results.\n| **Note:** Not all `INFORMATION_SCHEMA` views are supported for [BigQuery Omni system tables](/bigquery/docs/omni-introduction#limitations). You can view resource metadata with `INFORMATION_SCHEMA` for [Amazon S3](/bigquery/docs/omni-aws-create-external-table#view_resource_metadata) and [Azure Storage](/bigquery/docs/omni-azure-create-external-table#view_resource_metadata_with_information_schema).\n\nPricing\n-------\n\nFor projects that use on-demand pricing, queries against `INFORMATION_SCHEMA`\nviews incur a minimum of 10 MB of data processing charges, even if the bytes\nprocessed by the query are less than 10 MB. 10 MB is the minimum\nbilling amount for on-demand queries. For more information, see\n[On-demand pricing](/bigquery/pricing#on_demand_pricing).\n\nFor projects that use capacity-based pricing, queries against `INFORMATION_SCHEMA`\nviews and tables consume your purchased BigQuery slots. For more\ninformation, see [capacity-based pricing](/bigquery/pricing#capacity_compute_analysis_pricing).\n\nBecause `INFORMATION_SCHEMA` queries are not cached, you are charged each time\nthat you run an `INFORMATION_SCHEMA` query, even if the query text is the same\neach time you run it.\n\nYou are not charged storage fees for the `INFORMATION_SCHEMA` views.\n\nSyntax\n------\n\nAn `INFORMATION_SCHEMA` view needs to be qualified with a dataset or region.\n| **Note:** You must [specify a location](/bigquery/docs/locations#specify_locations) to query an `INFORMATION_SCHEMA` view. Querying an `INFORMATION_SCHEMA` view fails with the following error if the location of the query execution doesn't match the location of the dataset or regional qualifier used: \n|\n| ```\n| Table myproject: region-us.INFORMATION_SCHEMA.[VIEW] not found in location US\n| ```\n\n### Dataset qualifier\n\nWhen present, a dataset qualifier restricts results to the specified dataset.\nFor example: \n\n -- Returns metadata for tables in a single dataset.\n SELECT * FROM myDataset.INFORMATION_SCHEMA.TABLES;\n\nThe following `INFORMATION_SCHEMA` views support dataset qualifiers:\n\n- `COLUMNS`\n- `COLUMN_FIELD_PATHS`\n- `MATERIALIZED_VIEWS`\n- `PARAMETERS`\n- `PARTITIONS`\n- `ROUTINES`\n- `ROUTINE_OPTIONS`\n- `TABLES`\n- `TABLE_OPTIONS`\n- `VIEWS`\n\n### Region qualifier\n\nRegion qualifiers are represented using a\n`region-`\u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e syntax.\nAny [dataset location name](/bigquery/docs/locations) can be used for\n\u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e. For example, the following region qualifiers\nare valid:\n\n- `region-us`\n- `region-asia-east2`\n- `region-europe-north1`\n\nWhen present, a region qualifier restricts results to the specified\nlocation. For example, the following query returns metadata for all datasets in a\nproject in the `US` multi-region: \n\n```googlesql\n-- Returns metadata for all datasets in a region.\nSELECT * FROM region-us.INFORMATION_SCHEMA.SCHEMATA;\n```\n\nThe following `INFORMATION_SCHEMA` views don't support region qualifiers:\n\n- [`INFORMATION_SCHEMA.PARTITIONS`](/bigquery/docs/information-schema-partitions#scope_and_syntax)\n- [`INFORMATION_SCHEMA.SEARCH_INDEXES`](/bigquery/docs/information-schema-indexes#scope_and_syntax)\n- [`INFORMATION_SCHEMA.SEARCH_INDEX_COLUMNS`](/bigquery/docs/information-schema-index-columns)\n- [`INFORMATION_SCHEMA.SEARCH_INDEX_OPTIONS`](/bigquery/docs/information-schema-index-options)\n\nIf neither a region qualifier nor a dataset qualifier is specified, you will\nreceive an error.\n\nQueries against a region-qualified `INFORMATION_SCHEMA` view run in the region that you specify, which means that you can't write a single query to join data from views in different regions. To combine `INFORMATION_SCHEMA` views from multiple regions, read and combine the query results locally, or [copy](/bigquery/docs/managing-tables#copy_tables_across_regions) the resulting tables to a common region.\n\n### Project qualifier\n\nWhen present, a project qualifier restricts results to the specified project.\nFor example: \n\n -- Returns metadata for the specified project and region.\n SELECT * FROM myProject.`region-us`.INFORMATION_SCHEMA.TABLES;\n\n -- Returns metadata for the specified project and dataset.\n SELECT * FROM myProject.myDataset.INFORMATION_SCHEMA.TABLES;\n\nAll `INFORMATION_SCHEMA` views support project qualifiers. If a project\nqualifier is not specified, the view will default to the\nproject in which the query is executing.\n\nSpecifying a project qualifier for organization-level views\n(e.g. `STREAMING_TIMELINE_BY_ORGANIZATION`)\nhas no impact on the results.\n\nLimitations\n-----------\n\n- BigQuery `INFORMATION_SCHEMA` queries must be in GoogleSQL syntax. `INFORMATION_SCHEMA` does not support legacy SQL.\n- `INFORMATION_SCHEMA` query results are not cached.\n- `INFORMATION_SCHEMA` views cannot be used in DDL statements.\n- `INFORMATION_SCHEMA` views don't contain information about [hidden datasets](/bigquery/docs/datasets#hidden_datasets).\n- `INFORMATION_SCHEMA` queries with region qualifiers might include metadata from resources in that region from [deleted datasets that are within your time travel window](/bigquery/docs/restore-deleted-datasets).\n- When you list resources from an `INFORMATION_SCHEMA` view, the permissions are checked only at the parent level, not at an individual row level. Therefore, any [deny policy](/bigquery/docs/control-access-to-resources-iam#deny_access_to_a_resource) ([preview](/products#product-launch-stages)) that conditionally targets an individual row using tags is ignored."]]