google-big-queryHow do I use wildcards in Google BigQuery?
Wildcards are used in Google BigQuery to match patterns of strings in queries. Wildcards can be used in the SELECT, FROM, WHERE, and JOIN clauses of a query.
For example, the following query uses the LIKE
operator with a wildcard to match a pattern of strings:
SELECT *
FROM table_name
WHERE column_name LIKE '%string%'
The %
wildcard matches any string of any length (including an empty string). In the example above, the query will return all rows from the table_name
table where the column_name
contains the string string
.
In addition to the %
wildcard, BigQuery also supports the _
wildcard, which matches any single character. For example:
SELECT *
FROM table_name
WHERE column_name LIKE 'str_ng'
The query above will return all rows from the table_name
table where the column_name
contains the string str_ng
.
It is also possible to use multiple wildcards in a single query. For example:
SELECT *
FROM table_name
WHERE column_name LIKE '%str__ng%'
The query above will return all rows from the table_name
table where the column_name
contains the string str__ng
, where _
represents any single character.
For more information on using wildcards in BigQuery, please refer to the BigQuery documentation.
More of Google Big Query
- ¿Cuáles son las ventajas y desventajas de usar Google BigQuery?
- How do I add the Google Big Query logo to my website?
- How do I use the YEAR function in Google BigQuery?
- How can I use Google BigQuery to retrieve data from a specific year?
- How can I use Google Big Query to count the number of zeros in a given dataset?
- What are the advantages and disadvantages of using Google BigQuery?
- How do I create a primary key in Google Big Query?
- What are the limitations of using Google Big Query?
- How do I use the Google BigQuery API with Java?
- How do I use Google Big Query with Zoom?
See more codes...