Mega Code Archive
Search
.Net
ASP .Net
ASP .Net Tutorial
C#
C# Book
C# by API
C# Tutorial
VB.Net
VB.Net by API
VB.Net Tutorial
Visual C++ .Net
VisualBasic Script
Java
Java
Java Book
Java by API
Java Tutorial
Script
Flash ActionScript
Flex
JavaScript DHTML
JavaScript Reference
JavaScript Tutorial
Database
MSSQL
MSSQL Tutorial
MySQL
MySQL Tutorial
Oracle PLSQL
Oracle PLSQL Tutorial
PostgreSQL
Languages
Android
C
C Tutorial
C++
C++ Tutorial
Delphi
Perl
PHP
Python
Python Tutorial
Ruby
Silverlight
Office
MSOfficeExcel 2007 Tutorial
MSOfficePowerPoint 2007 Tutorial
MSOfficeWord 2007 Tutorial
Data
XML
XML Tutorial
MSSQL
System 47 codes
Home
MSSQL
System
1 @@TOTAL_ERRORS Displays readwrite errors encountered since the SQL Server instance was last started
2 @@TOTAL_READ Displays the number of non-cached disk reads by the SQL Server instance since it was last started
3 Another way to test for the existence of a table
4 Cannot create index Object myView was created with the following SET options off
5 Creates a new SQL Server login and then maps that login to a new database user
6 Creating a User-Defined Error Message
7 Creating Database Users
8 Default Constraints
9 Define primary key in table creation
10 Displaying Database and SQL Server Settings
11 Dropping a User-Defined Error Message
12 Error Handling in SQL Server 2005
13 Get schema name from sys XML_schema_collections
14 Get value from syscomments table
15 Get value from sysobjects table
16 Getting Information About Your Functions
17 INFORMATION_SCHEMA TABLES
18 Join syscomments and sysobjects
19 Modifying an already-defined error
20 Query INFORMATION_SCHEMA VIEWS
21 Query sys syscacheobjects
22 Reference the name column from sys types
23 Retrieve additional error information
24 Returning a Database Object Name and ID
25 Returning the Current Database ID and Name
26 Returns the name of the workstation on which you are working The syntax for the HOST_NAME function is as follows
27 SELECT @@ROWCOUNT
28 Select SUSER_SNAME()
29 SELECT TOP 10 FROM master dbo sysmessages
30 Select USER_NAME()
31 Set different row count number
32 SET QUOTED_IDENTIFIER ONOFF
33 Set row count
34 SET SHOWPLAN_TEXT ON
35 SET SHOWPLAN_TEXT ON for an index
36 Set STATISTICS onoff
37 Setting the LOCK_TIMEOUT to One Minute
38 Sp_dboption Northwind, autoclose, TRUE
39 System views
40 Sysusers appears in the master database and in every user-defined database
41 Table syscolumns appears in the master database and in every user-defined database
42 To unbind the default from the table, we use sp_unbindefault
43 Use system view (sys views) to track views in different schemas
44 Using sp_altermessage
45 Using sp_helptext
46 Using system table
47 Viewing UDF Metadata