Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.system_internals_partition_columns

  No additional text.


Syntax
CREATE VIEW sys.system_internals_partition_columns AS
	SELECT c.rsid AS partition_id,
		c.rscolid AS partition_column_id,
		c.rcmodified AS modified_count,
		case c.maxinrowlen when 0 then p.length
			else c.maxinrowlen end AS max_inrow_length,
		convert(bit, c.status & 1) AS is_replicated,				--RSC_REPLICATED
		convert(bit, c.status & 4) AS is_logged_for_replication,	--RSC_LOG_FOR_REPL
		convert(bit, c.status & 2) AS is_dropped,				--RSC_DROPPED
		p.xtype AS system_type_id,
		p.length AS max_length,
		p.prec AS precision,
		p.scale AS scale,
		convert(sysname, CollationPropertyFromId(c.cid, 'name')) AS collation_name,
		convert(bit, c.status & 32) AS is_filestream,			--RSC_FILESTREAM
		c.ordkey AS key_ordinal,
		convert(bit, 1 - (c.status & 128)/128) AS is_nullable,		-- RSC_NOTNULL		
		convert(bit, c.status & 8) AS is_descending_key,		--RSC_DESC_KEY
		convert(bit, c.status & 16) AS is_uniqueifier,			--RSC_UNIQUIFIER
		convert(smallint, convert(binary(2), c.offset & 0xffff)) AS leaf_offset,
		convert(smallint, substring(convert(binary(4), c.offset), 1, 2)) AS internal_offset,
		convert(tinyint, c.bitpos & 0xff) AS leaf_bit_position,
		convert(tinyint, c.bitpos/0x100) AS internal_bit_position,
		convert(smallint, convert(binary(2), c.nullbit & 0xffff)) AS leaf_null_bit,
		convert(smallint, substring(convert(binary(4), c.nullbit), 1, 2)) AS internal_null_bit,
		convert(bit, c.status & 64) AS is_anti_matter,			--RSC_ANTIMATTER
		convert(uniqueidentifier, c.colguid) AS partition_column_guid,
		sysconv(bit, c.status & 0x00000100) AS is_sparse	--RSC_SPARSE
	FROM sys.sysrscols c OUTER APPLY OpenRowset(TABLE RSCPROP, c.ti) p

 
Last revision 2008RTM
News

  Query a named instance
Sybase+ASE+silent+install
SQL 2008 R2
Deprecated procedures in SQL2008
Reporting Services item-level role definitions
Create all your missing indexes
Converting datetime field
Start MSSQL Server Profiler at time
Replicating MSSQL Server views
Exploring Microsoft Sharepoint
The OLE DB provider "SQLNCLI10" for linked server indicates.
Mobile solar charger
Oracle to SQL Server replication
Cannot insert the value NULL into column
Undocumented Microsoft SQL Server 2008
VMware
Zoekmachine optimalisatie
SQL Servers hidden objects
FckEditor
Flash in Ajax
De hype die AJAX heet
Barcode scannen
MySQL; Gratis, makkelijk en snel!
PHP
sIFR; de combinatie tussen HTML en Flash