-1

I am participating in an online program to become a data analyst. I am using SQL to construct queries along with the instruction videos. I feel there is no consistency using SQL regarding the use of backticks and apostrophes. When should I use backticks while constructing SQL queries, and when should I use apostrophes? Any help you can provide me is greatly appreciated. Thank you very much.

Greg

  • Backticks are proprietary MySql syntax to delimit object (table, column) names. Single quotes are used to delimit string literals. – Martin Smith Aug 24 '22 at 22:01

1 Answers1

0

Backticks are typically used by MySql as delimiters for using reserved words or names containing special characters such as a space. Most other platforms support "double quotes" as identifiers or also have their own proprietary syntax.

' single quotes are used to define 'string literal' values in almost all database platforms.

Stu
  • 30,392
  • 6
  • 14
  • 33