
-- Create some objects that we can use for demo purposes.
CREATE DATABASE [DataEncryptDemo]
go

USE [DataEncryptDemo]
go

CREATE LOGIN [login_low_priv] WITH PASSWORD = 'Login1 Password!'
CREATE USER [user_low_priv] FOR LOGIN [login_low_priv]
go

-- DATABASE, LOGIN, AND USER created

-- Create a simple table, where we will store some data we want to encrypt
-- note that CardNumber, the encrypted column is defined as varbinary
-- there is no special indication that this column contains encrypted data
CREATE TABLE [dbo].[CreditCards]( CardId INT PRIMARY KEY , 
                                  CardNumber varbinary(256) )
go
