|Introduction / MapInfo SQL Commands|
The MI SQL language uses standard quoting rules. String literals (values) must be enclosed in single quotation marks ('example') while identifiers (column names, table names, aliases, and so on) should be enclosed in double quotation marks ("example identifier") if necessary. Identifiers only need to be quoted if the parsing logic is unable to correctly parse the identifier. This would include identifiers that have spaces in their names or other special characters.
Identifiers or illegal characters (where they normally would not be allowed) are surrounded by double-quotes.
SELECT * FROM "/Samples/NamedTables/USA"
String literals or values are surrounded by single-quotes.
SELECT * FROM "/Samples/NamedTables/USA" WHERE Country = 'Canada'
In certain cases where a single-quote is within a string literal or value, use a double-single-quote (two ' characters). In the following example, the string literal O'hara's is defined.
SELECT * FROM Streets WHERE Business = 'O''hara''s'