Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.syscomments

  No additional text.


Syntax
CREATE VIEW sys.syscomments AS
	SELECT o.id AS id,
		convert(smallint, case when o.type in ('P', 'RF') then 1 else 0 end) AS number,
		s.colid, s.status,
		convert(varbinary(8000), s.text) AS ctext,
		convert(smallint, 2 + 4 * (s.status & 1)) AS texttype,
		convert(smallint, 0) AS language,
		sysconv(bit, s.status & 1) AS encrypted,
		sysconv(bit, 0) AS compressed,
		s.text
	FROM sys.sysschobjs o CROSS APPLY OpenRowset(TABLE SQLSRC, o.id, 0) s
	WHERE o.nsclass = 0 AND o.pclass = 1
		AND o.type IN ('C','D','P','R','V','X','FN','IF','TF','RF','IS','TR')
		AND has_access('CO', o.id) = 1
	UNION ALL
	SELECT c.object_id AS id,
		convert(smallint, c.column_id) AS number,
		s.colid, s.status,
		convert(varbinary(8000), s.text) AS ctext,
		convert(smallint, 2 + 4 * (s.status & 1)) AS texttype,
		convert(smallint, 0) AS language,
		sysconv(bit, s.status & 1) AS encrypted,
		sysconv(bit, 0) AS compressed,
		s.text
	FROM sys.computed_columns c CROSS APPLY OpenRowset(TABLE SQLSRC, c.object_id, c.column_id) s
	UNION ALL
	SELECT p.object_id AS id,
		convert(smallint, p.procedure_number) AS number,
		s.colid, s.status,
		convert(varbinary(8000), s.text) AS ctext,
		convert(smallint, 2 + 4 * (s.status & 1)) AS texttype,
		convert(smallint, 0) AS language,
		sysconv(bit, s.status & 1) AS encrypted,
		sysconv(bit, 0) AS compressed,
		s.text
	FROM sys.numbered_procedures p CROSS APPLY OpenRowset(TABLE SQLSRC, p.object_id, p.procedure_number) s
	UNION ALL
	SELECT o.id AS id,
		convert(smallint, case when o.type in ('P', 'RF') then 1 else 0 end) AS number,
		s.colid, s.status,
		convert(varbinary(8000), s.text) AS ctext,
		convert(smallint, 2) AS texttype,
		convert(smallint, 0) AS language,
		sysconv(bit, 0) AS encrypted,
		sysconv(bit, 0) AS compressed,
		s.text
	FROM sys.sysobjrdb o CROSS APPLY OpenRowset(TABLE SQLSRC, o.id, 0) s
	WHERE db_id() = 1 AND o.type IN ('P','V','X','FN','IF','TF')

 
Last revision 2008RTM
See also

  sp_addmergearticle (Procedure)
sp_helpconstraint (Procedure)
sp_helptext (Procedure)
sp_MShelpcolumns (Procedure)
sp_MSmakedynsnapshotvws (Procedure)
sp_MSrepl_addarticle (Procedure)
sp_MSrepl_helptext (Procedure)
sp_MStablechecks (Procedure)
       



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