Banner

Archive for the ‘SQL’ Category

Encrypting Data With Symmetric Keys in SQL Server

Icon Written by ywhitaker on February 14, 2010 – 9:51 pm

SQL Server 2005 introduced native database encryption capabilities. This, simply put, makes it easy for you to protect sensitive data from outside attacks. This article looks at how to set up and use encryption on a simple database table.
First, create a table for testing purposes in your existing database:
CREATE TABLE [dbo].[CreditCards] (CardId INT PRIMARY KEY [...]



Entering A Value Into A SQL Server Identity Field

Icon Written by ywhitaker on February 4, 2010 – 11:15 pm

Identity columns automatically assign a value for each new row inserted. Most of the time, you wouldn’t want to force a value in, but occasionally you may have special circumstances. If you need to insert your own value into an identity column, all you have to do is execute this statement in your stored procedure:
SET [...]