March 15, 2012 at 8:33 am
I have some code in a stored proc, but I am not sure of what the '@' char means. Please explain...
Here is the code I am having trouble understanding:
CREATE PROCEDURE [dbo].[RPT_Company_LIST]
(
@StartDate datetime = NULL,
@EndDate datetime = NULL,
@PrjName varchar(50) = '%',
@TaskName varchar(50) = '%',
@CoName varchar(50) = '%'
)
AS
March 15, 2012 at 8:37 am
the @ means its a parameter/variable which is used to run the query block
eg
delcare @name = 'Anthony'
select * from users where name = @name
March 15, 2012 at 8:38 am
Have you even bothered to look this up in Books Online? The @ is the first character of a local variable or parameter.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply