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
Ebook Download
View all
Learn
View all