2

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]

Nagendra
  • 171
  • 2
  • 12
  • You can't create **temp** table on the dataset, so use **create temp table test2 as select * from mss.Business.registration** instead. – Jaytiger Jul 15 '22 at 13:08

1 Answers1

2

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.

Sakshi Gatyan
  • 1,903
  • 7
  • 13