You can implicitly convert any character or binary datatype to unitext, as well as explicitly convert to and from unitext to other datatypes. The conversion result, however, is limited to the maximum length of the destination datatype.
select convert(char(3), ut) from tb
Conversion |
Datatypes |
---|---|
These datatypes convert implicitly to unitext |
char, varchar, unichar, univarchar, binary, varbinary, text, image |
These datatypes convert implicitly from unitext |
text, image |
These datatypes convert explicitly from unitext |
char, varchar, unichar, univarchar, binary, varbinary |
The alter table modify command does not support text, image, or unitext columns to be the modified column. To migrate from a text to a unitext column:
Use bcp out -Jutf8 out to copy text column data out
Create a table with unitext columns
Use bcp in -Jutf8 to insert data into the new table