hi,

how to convert db table column datatype from varchar to binary(16) in sql server 2005?

thanks

Recommended Answers

http://msdn.microsoft.com/en-us/library/ms190273.aspx

ALTER TABLE [table] ALTER COLUMN [column] BINARY(16)
Jump to Post

All 3 Replies

hi pritaeas,

i had done it earlier, and i got below error

Implicit conversion from data type varchar to binary is not allowed. Use the CONVERT function to run this query.

thanks

Add a new column, then copy/convert the data to it, then remove the old column and rename the new one.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.