Sql Server - Get view creation statement for existing view

前端 未结 6 827
灰色年华
灰色年华 2021-02-06 03:48

Is there a way to get the statement that created a view for an existing view in SQL Server 2008? I thought there was a stored procedure or some metadata that had this data, but

6条回答
  •  灰色年华
    2021-02-06 04:45

    Right click on the View name, then left click "SCRIPT VIEW as", then left click "ALTER TO", then left click "NEW QUERY EDITOR WINDOW" -- bingo, your there! To print, click on the script screen and then send to your printer using your toolbar printer icon or click on FILE>>PRINT. Of course, be careful to exit without making any changes. This works the same for stored procedures.

提交回复
热议问题