SQL: Local variables

DECLARE @var1 VARCHAR(50) SET @var1 = ‘hello’ Then you can use it in your SELECT (and other) statements later, like this: SELECT * FROM tablename WHERE welcomemessage = @var1