Collections:
Generating CREATE VIEW Scripts on Existing Views in SQL Server
How To Generate CREATE VIEW Script on an Existing View in SQL Server?
✍: FYIcenter.com
If you want to know how an existing view was created, you can use SQL Server Management Studio to automatically generate a "CREATE VIEW" 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 > Views > dbo.fyi_links_top.
3. Click right mouse button on dbo.fyi_links_top. The context menu shows up.
4. Select "Script Table as" > "CREATE to" > "New Query Editor Window". The following script will be displayed:
USE [FyiCenterData]
GO
/****** Object: View [dbo].[fyi_links_top]
Script Date: 05/19/2007 15:07:27 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE VIEW [dbo].[fyi_links_top] AS
SELECT id, counts, url FROM fyi_links
WHERE counts > 100;
⇒ sys.sql_modules - Getting View Definitions Back in SQL Server
⇐ "sp_help" - Getting a List of Columns in a View in SQL Server
2016-11-05, 4196🔥, 0💬
Popular Posts:
How To Get the Definition of a Stored Procedure Back in SQL Server Transact-SQL? If you want get the...
How To Create a Dynamic Cursor with the DYNAMIC Option in SQL Server Transact-SQL? If the underlying...
What Is an Oracle Tablespace in Oracle? An Oracle tablespace is a big unit of logical storage in an ...
How To Use GO Command in "sqlcmd" in SQL Server? "sqlcmd" is a command line client application to ru...
How To List All User Names in a Database in SQL Server? If you want to see a list of all user names ...