TOP

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
  • RSS
  • email
  • Facebook
  • Twitter
  • del.icio.us

Leave a Reply