7. AS inside of single quotes?

The instructions reads that the AS keyword must be inside of single quotes but the lesson also passes with double quotes.

Is there a reason it should be inside of single quotes or are both ways correct?

Could you provide the link to the lesson
and give us the FULL code you are using…

Sure, here is the link https://www.codecademy.com/en/courses/learn-sql/lessons/multiple-tables/exercises/aliases

So your question was
what is the syntax for a column alias
and as we are using SQLite
do a google search
== discussions / opinions ==
sqlite column name alias in quotes site:stackoverflow.com

My question was…

The code works, and the lesson passes with BOTH single quotes and ALSO double quotes, so why is the instructions telling us to use single quotes when double quotes also work?

Is there a difference?

You are using a lesson
and the creator has to have some control on the used-syntax
to be able to do a code-check
so it is explicitly stated, you have to use the single-quotes…

As a answer to your question
single-quotes vs double-quotes for column alias
i recommend to read
and keep in mind
every type Database-system has its specific’s
Read some == discussions / opinions= found with google search
sql Why does no database fully support ANSI or ISO SQL standards? site:stackoverflow.com

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.