Abstract
Now that you know how to build queries written as single executable lines of T-SQL statements, it is time to look at how to place these into a stored procedure or a function within SQL Server, allowing them to be run as often as they are required without the need to be retyped every time. It also allows code to be written that can accept input parameters, return a status, return rows of data, and, most importantly, allow you to improve the security of your database. You will see all of this and more in this chapter.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2012 Robin Dewson
About this chapter
Cite this chapter
Dewson, R. (2012). Stored Procedures, Functions, and Security. In: Beginning SQL Server 2012 for Developers. Apress. https://doi.org/10.1007/978-1-4302-3751-8_12
Download citation
DOI: https://doi.org/10.1007/978-1-4302-3751-8_12
Publisher Name: Apress
Print ISBN: 978-1-4302-3750-1
Online ISBN: 978-1-4302-3751-8
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books