
USE [DataEncryptDemo]
go

-- access through new view works without unneeded permissions
EXECUTE AS USER = 'user_low_priv'
SELECT * FROM [dbo].[CreditCardsView2]
REVERT
go

-- no access through the old view
EXECUTE AS USER = 'user_low_priv'
SELECT * FROM [dbo].[CreditCardsView]
REVERT
go