I’m trying to find the SQL record selection criteria (WHERE
clause) that is used by a table object in SQL Server Management Studio (Object Explorer > Database > ‘Tables’ folder).
I have a stored procedure which is pulling from a table object, so I want to check that table to see what criteria it’s using.
I’ve tried: right click table > Script Table As > Create To > New Query Editor Window). However, this just shows me a SELECT
list of the columns used in the table object, it does not include the criteria used to pull the records (WHERE
clause).
Is there something I’m missing here? If I use that same method on a stored procedure object, it opens the full SQL query and I can see the tables and criteria used. How can I do the same for a table object?
Tables
Thanks!
9