Results 1 to 4 of 4

Thread: A question about syntax

  1. #1
    Join Date
    Mar 2009
    Location
    Chennai, India
    Posts
    77
    Thanks
    16
    Thanked 7 Times in 6 Posts

    Default A question about syntax

    Say I have a query:

    SELECT * FROM my_table WHERE my_name = 'borris'


    What is the difference between enclosing borris in single quotes like this: 'borris' and enclosing with backticks: `borris`


    Because sometimes queries work only if certain terms are enclosed with backticks but the same query doesn't work if those terms are enclosed with single quotes.

  2. #2
    Join Date
    Apr 2009
    Location
    India
    Posts
    41
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Smile

    SELECT * FROM my_table WHERE my_name = 'borris'


    What is the difference between enclosing borris in single quotes like this: 'borris' and enclosing with backticks: `borris`


    Because sometimes queries work only if certain terms are enclosed with backticks but the same query doesn't work if those terms are enclosed with single quotes.
    Mostly terms are enclosed with backticks is work in the query.

  3. #3
    Join Date
    Mar 2009
    Location
    Chennai, India
    Posts
    77
    Thanks
    16
    Thanked 7 Times in 6 Posts

    Default

    Mostly terms are enclosed with backticks is work in the query.
    Yes, But I am asking,why is it so? There should be a rule about where single quotes are acceptable and where they are not

  4. #4
    Join Date
    Apr 2009
    Location
    India
    Posts
    41
    Thanks
    0
    Thanked 4 Times in 4 Posts

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •