7. AS inside of single quotes?


#1

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?


#2

@jaydacoder,
Could you provide the link to the lesson
and give us the FULL code you are using...


#3

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


#4

@jaydacoder
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


#5

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?


#6

@jaydacoder,
IMHO
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
http://stackoverflow.com/questions/1992314/what-is-the-difference-between-single-and-double-quotes-in-sql
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


#7

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