Using the empty string  Using the continuation character

Chapter 4: Expressions, Identifiers, and Wildcard Characters

Including quotation marks in character expressions

There are two ways to specify literal quotes within a char, or varchar entry. The first method is to double the quotes. For example, if you begin a character entry with a single quote and you want to include a single quote as part of the entry, use two single quotes:

'I don''t understand.'

With double quotes:

"He said, ""It's not really confusing."""

The second method is to enclose a quote in the opposite kind of quote mark. In other words, surround an entry containing a double quote with single quotes (or vice versa). Here are some examples:

'George said, "There must be a better way."' 
"Isn't there a better way?" 
'George asked, "Isn"t there a better way?"' 




Copyright © 2005. Sybase Inc. All rights reserved. Using the continuation character

View this book as PDF