July 31, 2005 at 11:54 am
Can anybody tell me where I can find the Tutorials for writing Stored Procedures? Please help me I am new to Stored Procedures.
Waiting 4 rply....
July 31, 2005 at 12:00 pm
Prashant - the best place to look up EVERYTHING - not just stored procedures - is BOL (Books on line)!!!
**ASCII stupid question, get a stupid ANSI !!!**
August 1, 2005 at 9:44 am
A stored procedure is nothing more than saving the code you write in a query analyzer window so that you can run it again.
If in QA you write
select top 5 * from MyTable
you can save it as a stored procedure.
Create procedure MyFirstSProc
as
select top 5 * from MyTable
and you can run it by writing MyFirstSProc in QA
With parameters
****************
If in QA you write
select top 5 * from MyTable
where field1 = 'abc'
and field2 = 123
you can save it as a stored procedure.
Create procedure MySecondSProc @field1 varchar(10), @field2 int
as
select top 5 * from MyTable
where field1 = @field1
and field2 = @field2
and you can run it by writing MySecondSProc 'abc', 123 in QA
August 1, 2005 at 9:56 am
This isn't a tutorial...but a geat book for anyone starting to program SQL server.
Murach’s SQL for SQL Server
August 1, 2005 at 9:59 am
I don't know about online tutorials, but if you are new to stored procedures, I'd definitely recommend a book, The Guru's Guide to Transact-SQL by Ken Henderson or another book like that. A book will cover a lot of the 'gotchas' like XACT_ABORT, @@NESTLEVEL, @@Error and @@ROWCOUNT, etc.
I agree with the above post about the Murach book as well.
August 2, 2005 at 3:13 pm
Beginning SQL Server 2000 Programming by Dewson from Wrox has 2 chapters (out of 20 total chapters) that are dedicated to Stored Procs.
The following is from Informit.com
SQL Server Stored Procedure Basics" is a sample chapter from The Guru's Guide to SQL Server Stored Procedures, XML, and HTML (Addison-Wesley, 2001, ISBN 0201700468), by Ken Henderson This chapter introduces you to stored procedures and XML in an HTML environment.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply