Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quotations for strings #184

Open
wtong5456 opened this issue Aug 8, 2017 · 2 comments
Open

quotations for strings #184

wtong5456 opened this issue Aug 8, 2017 · 2 comments

Comments

@wtong5456
Copy link

@wtong5456 wtong5456 commented Aug 8, 2017

In module 3 'Filtering' it is worth mentioning that either single or double quotation marks can be used in queries. I.e. SELECT * FROM Visited WHERE site='DR-1'; or SELECT * FROM Visited WHERE site="DR-1"; can be used.

@pgmccann
Copy link
Contributor

@pgmccann pgmccann commented Aug 22, 2017

This is not universal across database managers - in PostgreSQL only single quotes can be used to specify string values by which to filter (double quotes can be used to create and refer to case-sensitive table and column names) - I believe this is in accordance with the ANSI SQL standard. I would suggest that the use of single quotes be at least encouraged here.

rgaiacs added a commit to rgaiacs/swc-sql-novice-survey that referenced this issue Apr 17, 2018
Replace extract_figures.py with Javacript
@danmichaelo
Copy link
Contributor

@danmichaelo danmichaelo commented Oct 12, 2018

Agree, we should encourage single quotes even though double quotes works. The SQLite FAQ also does this:

Use single-quotes, not double-quotes, around string literals in SQL. This is what the SQL standard requires.

@ErinBecker ErinBecker added this to the June 2019 Release milestone May 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants