16 January 2014

Get the related table to a view

SELECT view_name, Table_Name
FROM
 INFORMATION_SCHEMA.VIEW_TABLE_USAGE
WHERE
 View_Name = 'YourViewName'
ORDER
 BY view_name, table_name

No comments:

Post a Comment