Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 19th, 2006, 12:03 AM
Authorized User
 
Join Date: Nov 2005
Posts: 51
Thanks: 0
Thanked 0 Times in 0 Posts
Default Help me to DO Stored Procedures

Hi,
 im new 4 sql server. i want to create sored procedures 4 insert,update and delete. so i dont have a knowledge to create those and i dont no how to create and wht's the goodway to do. pls help me. i need it.
thx

MSB
__________________
MSB
 
Old October 19th, 2006, 01:58 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 625
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jemacc
Default

start by using BOOKS ONLINE, it has great examples.

Jaime E. Maccou
 
Old October 19th, 2006, 08:42 AM
SQLScott's Avatar
Wrox Author
 
Join Date: Dec 2004
Posts: 338
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Hi MSB,

Stored Procedure syntax is fairly straight forward. The general syntax is as follows:

CREATE PROCEDURE procedurename
    Parameters
AS
BEGIN
   SELECT
   DELETE
   UPDATE
END

Although, I agree with Jamie, Books Online will give you much more information.


Scott Klein
Author - Professional SQL Server 2005 XML
http://www.wrox.com/WileyCDA/WroxTit...764597922.html
 
Old October 23rd, 2006, 01:54 PM
Registered User
 
Join Date: Oct 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
I totallly agree with Jaime and Scott.
Here is an example of simple stored Proc for Delete statement,
///to delete particular EmpId from Employee table:
CREATE PROCEDURE DeleteParticularEmployee
@EmpId int
AS
Delete from Employee
where Emp_Id = @EmpId
GO







Similar Threads
Thread Thread Starter Forum Replies Last Post
Stored Procedures KeviJay VB Databases Basics 1 June 5th, 2008 07:17 AM
stored procedures MunishBhatia SQL Server 2005 4 April 12th, 2008 01:39 AM
STORED PROCEDURES shazia1 SQL Server ASP 7 September 26th, 2007 06:11 AM
Stored Procedures itHighway SQL Server 2000 3 November 23rd, 2005 10:08 AM
Stored Procedures stu9820 Access 3 February 8th, 2004 01:13 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.