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.
精彩评论