I'm looking for a way to return a bit representing whether 2 ints are equal. When I try the following I get "Incorrect syntax near '='." What am I missing? I'm using SQL Server 2005.
DECLARE @Table1Count AS INT
DECLARE @Table2Count AS INT
SELECT @Table1Count = COUNT(*) FROM Table1
SELECT @Table2Count = COUNT(*) FROM Table2
PRINT @Table1Count = @Table2Count
Thanks.