Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stored Procedures

Status
Not open for further replies.

leo3690

Programmer
Jan 26, 2004
1
US
Can tell me what this means?
WHERE (qno @type)

I am not sure what the @ sign is doing
 
What is the database?

In SQL server the '@' symbol signifies a variable or parameter. Usually one that is passed to the stored procedure. This would tell me that '@Type' is a parameter that needs to be passed to the stored procedure in order for it to be executed properly. These parameters are usually defines when the stored procedure is created and given a specific data type. For example.

Code:
 Create procedure myStoredProc @Colour varchar(20) AS
Select * From Table1 Where (Field3 = @Colour)

In this case @Colour is a parameter that needs to be passed to the stored procedure when it is executed. Such as this,

Code:
exec myStoredproc("Black")

will select all records where the data in Field3 is black. I can't remember if the brackets are required. my apologies if they are not.

Take Care,

zemp

"If the grass looks greener... it's probably because there is more manure."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top