Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 23 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
23
Dung lượng
692 KB
Nội dung
Session 4Introducing Stored Procedures (SPs)
ReviewIn preview session, we learnt:Introduction to ViewsDefining ViewsExploring CREATE VIEW optionsModifying data through Views
Session objectivesStored ProceduresDefine Stored ProceduresTypes of Stored ProceduresCreate and Execute Stored ProceduresViewing InformationModifying and Dropping Stored ProceduresWorking with Stored Procedures
Stored ProceduresIs a group of Transact-SQL statements that act as a single block of code that performs a specific task.Useful for performing repetitive tasksSupport user-declared variables, conditional execution and other programming features
AdvantagesImproved security Precompiled ExecutionReduced Client/Server TrafficReuse of Code
Types of Stored ProceduresSystem Stored Procedure: used for interacting with system tables and performing administrative tasksExtended Stored Procedure: help SQL Server in interacting with the operating system User-defined Stored Procedure: as custom stored procedure
System Stored ProceduresSystem storedproceduresSQL Server Query Agent SQL Mail Catalog Extended Replication System Security Cursor Distributed Query
Custom Stored Procedures
Custom Stored Procedures - sample
Custom Stored Procedures
123doc.vn