1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[SQL] When to use single quotes, double quotes, and backticks in MySQL

Discussão em 'Outras Linguagens' iniciado por Stack, Dezembro 1, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to learn the best way to write queries. I also understand the importance of being consistent. Until now, I have randomly used single quotes, double quotes, and backticks without any real thought.

    Example:

    $query = 'INSERT INTO table (id, col1, col2) VALUES (NULL, val1, val2)';


    Also, in the above example, consider that table, col1, val1, etc. may be variables.

    What is the standard for this? What do you do?

    Continue reading...

Compartilhe esta Página