Updating column name in sql
SQL Server has an encryption hierarchy that needs to be followed in order to support the encryption capabilities.We will follow the same hierarchy in the subsequent steps of this tip. Customer_data table which contains credit card details for customers.Below is a sample code which can be used to encrypt the data.
UPDATE summary_data SET current_category = (SELECT category_id FROM products WHERE products.product_id = summary_data.product_id) WHERE EXISTS (SELECT category_id FROM products WHERE products.product_id = summary_data.product_id); If you want to test your skills using the SQL UPDATE statement, try some of our practice exercises.With data stored in tables, you have a few options to protect data. Second, we can also assign column level permissions to users. Check out this tip to learn more about column level encryption.An important option to be considered during restricting unauthorized access to data is to encrypt data so that even if somebody was able to reach to data it is not discernable by a simple query.Since critical information like credit card numbers are stored in column or two, it does not make sense to encrypt the complete database or database files.In this tip I will walk through the processes of encrypting a column in a table which contains credit card information of customers of XYZ company by using SQL Server symmetric key encryption.