Q

Characters in syntax

MySQL expert Scott Noyes recommends sticking to straight quotes around strings and backticks around identifiers to prevent incorrect queries.

I am searching large databases of telephone records. The databases combine domestic and UK calls. I want to create two databases. One database will contain all of the calls to the UK and One database will contain all of the calls to the US. My query for UK calls went perfectly. However, when I query for non-UK calls, I get error messages. What do I do about the syntax?

Like most computer languages, SQL is picky about the characters used for syntax. Sometimes, "smart quotes" are inserted by some word processors. Stick to straight quotes (') around strings and backticks (`) around identifiers (table and column names).

This was first published in August 2006

Dig deeper on Introduction to Linux system administration

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchDataCenter

SearchServerVirtualization

SearchCloudComputing

SearchEnterpriseDesktop

Close