Sql Server - Get view creation statement for existing view

前端 未结 6 822
灰色年华
灰色年华 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:35

    It's in sys.sql_modules. Other schema tables like INFORMATION_SCHEMA ones only contain the first 4000 characters of the definition (they truncate).

提交回复
热议问题