When I run this statement:
WHERE myID = 1
the value returned in the mySecretData field is always the same. It's like the rand() function is evalued one time and that single result used repeatedly in the query.
1. How can I code this statement to return "random" values to encrypt?
2. I thought the t-sql encryption functions were non-deterministic, so if rand() did return a single value that was repeatedly used, I'd still expect the mySecretData field to contain different values. But it doesn't. I'm puzzled.
View Complete Post