I’m getting an error when creating a table. can anyone tell me what I’m doing wrong ?
DROP Table if exists #PercentPopulationVaccinated
Create Table #PercentPopulationVaccinated
(
Continent nvarchar(255),
Location nvarchar(255),
Date datetime,
Population numeric,
New_vaccinations numeric,
RollingPeopleVaccinated numeric
)
2
Answers
You are using a syntax for Microsoft SQL Server instead of Google BigQuery. Here is an adjusted syntax for Google BigQuery:
You have a few issues with your syntax. I’d highly recommend reviewing the DDL Docs when you have a moment.
#
as a table prefix. Additionally, it’s best practice to explicitly list the dataset you’re creating the table in:CREATE TABLE my-dataset.PercentPopulationVaccinated
;
to separate each of the unique DDL statements. Alternately, you can combine the two with theOR REPLACE
operator:OR