开发者

Is there a find sql statement behind a view

Is there a find the actual sql statement behind开发者_StackOverflow中文版 a view. I am in sql management studio, i right clicked on the view and i dont see an option to reveal the sql behine the view.


Views -> your view -> Script View As -> Create

you can also do

SELECT OBJECT_DEFINITION (OBJECT_ID(N'your view')); 


Right click the view and Design...


In SSMS (assuming appropriate permissions) you should be able to right-click on the view and choose the "Script View as" option.


And why would you have views that are not in source control as a script already? You should not be creating views except through scripts.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜