DECLARE @local_variable (Transact-SQL)

 

DECLARE @S INT, @E INT ; --Make sure you put (;) at the end
SET @S = 13090; --Make Sure you put (;) at the end
SET @E = 22000; --Make Sure You Put (;) at the end
SELECT * FROM tStudent WHERE AdmissionNumber BETWEEN @S AND @E

More Details: http://msdn.microsoft.com/en-us/library/ms188927.aspx

Advertisements
By simplemsexchange Posted in SQL 2008

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s