June 13, 2012

sp_tables_info_90_rowset_64 (Transact-SQL MetaData) Definition

Please note: that the following source code is provided and copyrighted by Microsoft and is for educational purpose only.
The meta data is from an SQL 2012 Server.

I have posted alot more, find the whole list here.

Goto Definition or MetaData

Definition:

sys.sp_tables_info_90_rowset_64(nvarchar @table_name
, nvarchar @table_schema
, nvarchar @table_type)

MetaData:

   
create procedure sys.sp_tables_info_90_rowset_64
(
@table_name sysname,
@table_schema sysname = null,
@table_type nvarchar(255) = null
)
as
select
TABLE_CATALOG = s_tiv.TABLE_CATALOG,
TABLE_SCHEMA = s_tiv.TABLE_SCHEMA,
TABLE_NAME = s_tiv.TABLE_NAME,
TABLE_TYPE = s_tiv.TABLE_TYPE,
TABLE_GUID = s_tiv.TABLE_GUID,
BOOKMARKS = s_tiv.BOOKMARKS,
BOOKMARK_TYPE = s_tiv.BOOKMARK_TYPE,
BOOKMARK_DATATYPE = convert(smallint, 21), -- DBTYPE_UI8
BOOKMARK_MAXIMUM_LENGTH = convert(int, 8),
BOOKMARK_INFORMATION = s_tiv.BOOKMARK_INFORMATION,
TABLE_VERSION = s_tiv.TABLE_VERSION,
CARDINALITY = s_tiv.CARDINALITY,
DESCRIPTION = s_tiv.DESCRIPTION,
TABLE_PROPID = s_tiv.TABLE_PROPID,
TABLE_FLAGS = s_tiv.TABLE_FLAGS
from
sys.spt_tables_info_view s_tiv
where
(
(@table_schema is null and s_tiv.TABLE_NAME = @table_name) or
object_id(quotename(@table_schema) + '.' + quotename(@table_name)) = s_tiv.object_id
) and
(@table_type is null or @table_type = s_tiv.TABLE_TYPE)
order by 4, 2, 3

No comments:

Post a Comment

Total Pageviews