如何在 CREATE TABLE DDL 中添加列描述

How to add column description in CREATE TABLE DDL

我想向我在 BigQuery 中创建的 table 添加列描述。

当我尝试执行以下查询时:

CREATE TABLE mydataset.newtable (
  x STRING(10) "denotes value of x",
  y STRING(10) "denotes value of y",
  z BIGNUMERIC(35) "denotes value of z"
) AS (SELECT x, y, z FROM table2)

我收到一个错误:

Syntax error: Expected ")" or "," but got string literal "denotes value of x"

我错过了什么?

根据 the documentation 这应该有效:

CREATE TABLE mydataset.newtable (
  x STRING(10)     OPTIONS(description="denotes value of x"),
  y STRING(10)     OPTIONS(description="denotes value of y"),
  z BIGNUMERIC(35) OPTIONS(description="denotes value of z")
)