I may have a few queries on encryption.
I was trying to understand if opening a key is required each time we encrypt/decrypt. But something is confusing me. I run this. I don't understand why it works. Why isn't this giving an error?
CLOSE SYMMETRIC KEY ClaimantNameKey
GO
UPDATE tmpClaimantEncrypted
SET NameEncrypted =
EncryptByKey(Key_GUID('ClaimantNameKey'), Name)
where ID = 1953996
GO