June 6, 2012

sp_primary_keys_rowset_rmt (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_primary_keys_rowset_rmt(nvarchar @table_server
, nvarchar @table_catalog
, nvarchar @table_name
, nvarchar @table_schema)

MetaData:

   
create procedure sys.sp_primary_keys_rowset_rmt
(
@table_server sysname,
@table_catalog sysname = null,
@table_name sysname = null,
@table_schema sysname = null
)
as
select
TABLE_CATALOG,
TABLE_SCHEMA,
TABLE_NAME,
COLUMN_NAME,
COLUMN_GUID,
COLUMN_PROPID,
ORDINAL
PK_NAME
from
sys.fn_remote_primary_keys(@table_server, @table_catalog, @table_schema, @table_name)
order by 1,2,3

No comments:

Post a Comment

Total Pageviews