Information schema views | Internals of Views Meta Data

Monday, October 20th, 2008

-- Displays views accessable to current user CREATE VIEW INFORMATION_SCHEMA.VIEWS AS SELECT db_name() AS TABLE_CATALOG, schema_name(schema_id) AS TABLE_SCHEMA, name AS TABLE_NAME, convert(nvarchar(4000), object_definition(object_id)) AS VIEW_DEFINITION, convert(varchar(7), CASE with_check_option WHEN 1 THEN 'CASCADE' ELSE 'NONE' END) AS CHECK_OPTION, 'NO' ...