When creating a table, there may be a need to set encryption for a specific column. Let us say you create a logins table with columns for username and password. Most likely, you would want the password column to be encrypted so it won’t be visible to anybody that has access to the database.
Here is one way you can enable encryption:
1. First you have to set the data type of the column to varbinary(100) or (max)
2. Next, is you can add the function PWDENCRYPT in your T-SQL script
set password = (PWDENCRYPT(‘Password Here’))
where employeeid = 1
Once you commit the changes, your password value will be converted to something similar to 0x0200635…