Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Can we save Unicode in a varchar?

Author  Topic 

denis_the_thief
Aged Yak Warrior

596 Posts

Posted - 2012-06-18 : 15:08:48
We have a new requirement to save Unicode strings in what is currently a varchar column.

Does anyone have experience in this and know of any SQL errors that could arise in existing code?

Does anyone know if we can leave the column as varchar and save unicode strings in the varchar column? If we could, I guess it would look like binary and one character of Unicode would take up 2 characters of varchar.

robvolk
Most Valuable Yak

15732 Posts

Posted - 2012-06-18 : 15:11:13
No, you'll have to alter the column to nvarchar. Otherwise you'll get character conversions and potentially lose data.
Go to Top of Page
   

- Advertisement -