O'Reilly logo

Microsoft® SQL Server™ 2000 DBA Survival Guide, Second Edition by Mark Spenik, Orryn Sledge

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Stored Procedure and Cursor FAQ

Following are some of the common questions asked by DBAs about SQL Server stored procedures and cursors:

Q1: Do stored procedures really run faster than sending SQL statements directly to SQL Server?
A1: Yes, stored procedures run faster because they are precompiled, cached, and generate less network traffic.
Q2:When should I use stored procedures?
A2: Whenever you want to maximize performance and want to consolidate SQL code into a single program. Examples of stored procedure include INSERT, DELETE, and UPDATE stored procedures and reporting stored procedures.
Q3:When should I not use stored procedures?
A3: Stored procedures probably should not be used for ad-hoc querying because the parameters and the data being ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required