What data can be stored in varbinary data type of SQL Server?

Viewed 88508

I have a table in which the userpassword field have varbinary datatype, So I'm confused that in which form should I save the data into userpassword field because when I save varchar data it gave me error.

4 Answers
SELECT CAST(N'Test' as VARBINARY)

------you have to give it a size ---------->

SELECT CAST(N'Test' as VARBINARY(30))
Related