Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Server stored procedure beginner's guide [closed]

Please recommend some websites with a quick guide. MSDN is good but it's hard to pick up some basic stuff in a short time. Thanks.

like image 524
Stan Avatar asked Apr 16 '10 00:04

Stan


People also ask

Can we create stored procedure without begin and end?

They are optional. One or more Transact-SQL statements comprising the body of the procedure. You can use the optional BEGIN and END keywords to enclose the statements. Save this answer.

How do I enable a stored procedure in SQL?

Expand Databases, expand the database in which the procedure belongs, and then expand Programmability. Expand Stored Procedures, right-click the procedure to grant permissions on, and then select Properties. From Stored Procedure Properties, select the Permissions page.

Why set Nocount on is used in SQL?

SET NOCOUNT ON prevents the sending of DONEINPROC messages to the client for each statement in a stored procedure.

How do I open a stored procedure in SQL Server?

Using SQL Server Management StudioExpand Stored Procedures, right-click the procedure and then select Script Stored Procedure as, and then select one of the following: Create To, Alter To, or Drop and Create To. Select New Query Editor Window. This will display the procedure definition.


2 Answers

here are some good ones:

SQL Server Stored Procedures for Beginners
SQL Server Stored Procedure Basics
SQL Server Stored Procedures 101
Stored Procedure Basics

find more here: google: sql server stored procedure basics

like image 108
KM. Avatar answered Oct 10 '22 05:10

KM.


Actually the documentation has some pretty good links:

This is a good start on MSDN for basic Stored Procedure syntax with examples.

like image 28
Jeremy Avatar answered Oct 10 '22 03:10

Jeremy