Character String Data, Part 1 of 2
Character string data is represented by the following:> A sequence of zero or more characters.
> The length can be fixed or varying.
> In an SQL statement, it is a string of characters surrounded by single quotes.
> It is case sensitive, with upper- and lower-case letters, as well as numbers, spaces, and special characters.
> The length of a string is an integer, including zero. An empty string of no characters is represented by two single quotes with no space between the quotes (”). This is a zero-length string.
> If you wish to place a single quote in a data value, you do this with two single quotes, so ‘I can”t go’ means, “I can’t go.” A double-quote character (“) doesn’t need this special treatment.
> SQL can handle and sort fixed-length strings faster than variable-length strings.
> Keep column data size as small as possible, because too much volume will waste time and storage.
> SQL:1999 introduced CLOB and NCLOB, but most RDBMS systems already had similar data types.
> Oracle treats empty strings as null.
> In MySQL, if the ANSI_QUOTES option is turned on, string literals can only be quoted with single quotes and an identifier is surrounded by double quotes.