Nagendra
Nagendra

Reputation: 211

I am not able to create temporary table in Bigquery

got below error while trying to create temporary table in Bigquery .

create or replace temporary table mss.Business.test2 as select * from mss.Business.registration

Query error: Temporary tables may not be qualified at [2:36]

Upvotes: 3

Views: 11780

Answers (1)

Sakshi Gatyan
Sakshi Gatyan

Reputation: 2126

As mentioned by @Jaytiger names are not included in the CREATE TEMP TABLE statement.

You can create temporary table to store the results of a query as follows:

CREATE OR REPLACE TEMP TABLE <table1> as (SELECT * FROM `<dataset>.<table2>`);
SELECT * from <table1>

You can follow this documentation for further examples on Temp tables.

Upvotes: 3

Related Questions