The variable-length unitext datatype can hold up to 1,073,741,823 Unicode characters (2,147,483,646 bytes). You can use unitext anywhere you use the text datatype, with the same semantics. unitext columns are stored in UTF-16 encoding, regardless of the Adaptive Server default character set.
The unitext datatype uses the same storage mechanism as text. To save storage space, define unitext columns as NULL. When you initialize a unitext column with a non-null insert or update clause, Adaptive Server assigns a text pointer and allocates an entire 2K data page to hold the value.
You cannot use the unitext datatype
For parameters to stored procedures, as values passed to these parameters, or for local variables
For parameters to remore procedure calls (RPCs)
In order by, compute, group by, or union clauses
In an index
In subqueries or joins
In a where clause, except with the keyword like
With the concatenation operator (+).
The benefits of unitext include:
Large Unicode character data. Together with unichar and univarchar datatypes, Adaptive Server provides complete Unicode datatype support, which is best for incremental multilingual applications.
unitext stores data in UTF-16, which is the native encoding for Windows and Java environments.
For more information about the Unitext datatype, see “Changing text, unitext, and image data”.
Copyright © 2005. Sybase Inc. All rights reserved. |