Commenting in BigQuery SQL

BigQuery supports the following format for commenting code. The following is an example of single-line commenting, where anything from the start, to the end of that line is ignored when executing the query:

#legacySQLSELECT       repo_name, --repository name      language.name --programming languageFROM [bigquery-public-data:github_repos.languages] 

A multi-line comment is specified by enclosing the text within /* */, as shown in this query:

#legacySQL/*This query will return the repository name and the programming languages used in the repository.*/SELECT       repo_name, --repository name      language.name --programming languageFROM [bigquery-public-data:github_repos.languages] 

The SQL language includes about 10 main commands; ...

Get Learning Google BigQuery now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.