SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,422 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
When I connect SSMS to a SQL Server 2022 database with Always Encrypted enabled, I get the following error: "Msg 206, Level 16, State 2, Line 3 - Operand type clash: datetime is incompatible with uniqueidentifier."
This occurs with the code below:
DECLARE @Date AS DateTime = GETDATE();
DECLARE @Id AS uniqueidentifier;
However, if I change the order of the declarations, the error disappears.