Single quotes are used to wrap around strings so that they are identified accordingly. Double quotes, depending on the database, often are interpreted as database component identifies. For example, if you want to select all rows from table 'DATA_SOURCE' where column A equals the phrase 'This is a string', you would write statement 1 below. If your column name had a space in it (e.g. "My Column", you would use double quotes to identify the whole name.
What is the difference between single and double quotes in SQL?
What is the difference between single quotes and double quotes in SQL?
Follow
1
Add comment
More
Report
2 Answers By Expert Tutors
--1)
SELECT * FROM DATA_SOURCE WHERE A = 'This is a string';
--2)
SELECT * FROM DATA_SOURCE WHERE "My Column" = 'This is a string';
John D. answered 05/17/19
Tutor
4.9
(100)
Visual Basic, Microsoft Office, Databases, General Computing
Double quotes are never used. Text and dates must be inside single quotation marks.
Still looking for help? Get the right answer, fast.
Ask a question for free
Get a free answer to a quick problem.
Most questions answered within 4 hours.
OR
Find an Online Tutor Now
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.