
Hi to all,
I want to ask your opinions about what kind of quote to use in appending or using string values in our SQL statements. Is it the single quote or the double quote? For me, I think the double quote is very effective because, it can accept a string value as a whole, even if the string value has a single quote in it, (ex: Toby's), in which we could write it as "Toby's".
How about the single quote? It generates error if use would replace those double quotes in the example string above, because the string itself has a single quote in it. Putting escape characters would do the trick but isn't it a little hard to track if you are writing a lot/longer SQL statements?
Maybe there are things that I did not know about? I see many examples in books, using the single quote. Even the dump file of mySQL uses single quotes (correct me if I am wrong)?
Happy to hear from you guys!
Thanks and god bless all!