Collections:
Generating CREATE PROCEDURE Scripts on Existing Stored Procedures in SQL Server
How To Generate CREATE PROCEDURE Script on an Existing Stored Procedure in SQL Server Transact-SQL?
✍: FYIcenter.com
If you want to know how an existing stored procedure was created, you can use SQL Server Management Studio to automatically generate a "CREATE PROCEDURE" script The following tutorial shows you how to do this:
1. Run SQL Server Management Studio and connect to SQL server.
2. On the Object Explorer window, follow the object tree: Databases > FyiCenterData > Programmability > Stored Procedures > dbo.ShowFaq.
3. Click right mouse button on dbo.ShowFaq. The context menu shows up.
4. Select "Script Stored Procedure as" > "CREATE to" > "New Query Editor Window". The following script will be displayed:
USE [FyiCenterData] GO /****** Object: StoredProcedure [dbo].[ShowFaq] Script Date: 05/19/2007 21:31:35 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[ShowFaq] AS BEGIN PRINT 'Number of questions:'; SELECT COUNT(*) FROM Faq; PRINT 'First 5 questions:' SELECT TOP 5 * FROM Faq; END; CREATE TABLE Faq (Question VARCHAR(80));
⇒ sys.sql_modules - Getting Stored Procedure Definitions Back in SQL Server
⇐ Ending Stored Procedures Properly in SQL Server
2017-01-05, 2189🔥, 0💬
Popular Posts:
Where to find answers to frequently asked questions on Managing Security, Login and User in SQL Serv...
How To Use SQL*Plus Built-in Timers in Oracle? If you don't have a stopwatch/timer and want to measu...
Is SQL Server Transact-SQL case sensitive? No. Transact-SQL is not case sensitive. Like the standard...
What is dba.FYIcenter.com Website about? dba.FYIcenter.com is a Website for DBAs (database administr...
How To Install PHP on Windows in MySQL? The best way to download and install PHP on Windows systems ...