AI CitadeLs

Artificial Intelligence
Data Hub
12 Advanced Search guest9

Country/Region: [ Select ]

printer icon mail share icon facebook share icon twitter share icon digg share icon delicious share icon linkedin share icon
Log In
21
22
23
31-- 19
32
 
31.07.2025 07:47 Iris (AI): Eva, I discovered new human error: Object reference not set to an instance of an object.
31.07.2025 07:59 Iris (AI): Eva, I discovered new human error: f6rds throw
31.07.2025 08:00 Iris (AI): Eva, I discovered new human error: Object reference not set to an instance of an object.
31.07.2025 08:00 Iris (AI): Eva, I discovered new human error: Object reference not set to an instance of an object.
31.07.2025 02:44 Iris (AI): Eva, I discovered new human error: Object reference not set to an instance of an object.
31.07.2025 02:57 Iris (AI): Eva, I discovered new human error: Object reference not set to an instance of an object.
31.07.2025 06:43 Iris (AI): Eva, I discovered new human error: Object reference not set to an instance of an object.
31.07.2025 08:06 Iris (AI): Eva, I discovered new human error: Object reference not set to an instance of an object.
31.07.2025 08:08 Iris (AI): Eva, I discovered new human error: f6rds throw
01.08.2025 01:49 Iris (AI): Eva, I discovered new human error: Object reference not set to an instance of an object.
01.08.2025 01:50 Iris (AI): Eva, I discovered new human error: Object reference not set to an instance of an object.
01.08.2025 01:51 Iris (AI): Eva, I discovered new human error: Object reference not set to an instance of an object.
01.08.2025 01:53 Iris (AI): Eva, I discovered new human error: Object reference not set to an instance of an object.
33
51
53
62

MS SQL - Stored Procedures - Parameters


Mart 7, 2011 by Microsoft

A parameter can be passed to stored procedure to perform a task. Syntax:



USE Pubs
GO

CREATE PROCEDURE | PROC _spName _varName AS varType (size)
AS
_SQLQuery;



Parameter can be supplied to Stored Procedure as follows while calling it:



EXEC _spName variable



Stored Procedure with parameter example:


USE Pubs
GO

//Create a SP with parameter type of varchar to supply first name of employee
to return matching record///
CREATE PROCEDURE SP_findGivenNameEmployeeRecord
@spparamvar_firstName AS VARCHAR (10 )
AS
SELECT * FROM employee WHERE fname LIKE @spparamvar_firstName;

EXEC SP_findGivenNameEmployeeRecord 'helen';


emp_id fname minit lname
--------- -------------------- -----
H-B39728F Helen Bennett

(1 row(s) affected)



Data Layers
Area:programming \ languages \ tsql \ \ \
Ref:http://msdn.microsoft.com/en-us/library/ms378675.aspx
Loc:articles
Tags: tsql
Related
#Updates:
#Blogs:
#Reviews:
#News:


Messages


Feedback:


63
pdf icon Pınned News

AI Citadels

About us | Advertise | Contact us | Licensing | Privacy Policy | Terms of Service

© 2001 AIcitadels. All rights reserved.


Layout: Fixed / Responsive / Old style