TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
SQL Server Transact Basic to Expert - Select Query with variables
Karthikeyan Anbarasan
Apr 28, 2011
2.4
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
SQL Server Transact Basic to Expert - Select Query with variables
This blog show how to use a variable declared seperately and used in select query as a condition
Example:
Declare @empname as varchar(50)
@empname = 'Karthik'
Select Empsal, Empid
From emptable
Where empname = @empname
SQL Server Transact Basic to Expert - Select Query with variables
Next Recommended Reading
SQL Server Transact Basic to Expert - Query a temporary and a table variable tables