228 Part I EXAM PREPARATION TABLE 4.10 continued

228 Part I EXAM PREPARATION TABLE 4.10 continued DATABASE/SYSTEM FUNCTIONS IN T-SQL System Function Parameters Description NULLIF (expression1, This gives a NULL value only if the two expression2) expressions are equivalent. OBJECT_ID (object_name) The database object identification number. OBJECT_NAME (Object_ID) The database object name. STATS_DATE (Table_ID, The date that the statistics for a Index_ID) particular index were last updated. SUSER_ID (login name) This is only used for backward compatibility. Use SUSER_SID instead. SUSER_SID (login name) The user s login identification number. SUSER_NAME (server_user_id) This is only used for backward compatibility. Use SUSER_SNAME instead. SUSER_SNAME (server_user_id) The user s login identification name. USER_ID (user_name) The user s database identification number. USER_NAME (user_ID) The user s database username. ISNULL can be useful when you want to convert all NULL values to a particular value. For example, look at the following query. This query converts all NULL values into zeros: SELECT ISNULL (price, 0.0000), price FROM titles System functions, information schema views, or the system stored procedures can be used to gain access to system information without querying the system tables directly. System tables can change significantly between versions of SQL Server. SQL Server provides system stored procedures or information schema views for obtaining information about the properties of data, such as the type of data in a column (numeric, text, and so on) or the length of a column. This type of information is called meta data and is maintained by SQL Server for all server and database objects. Meta data can be used to find out information about the structure of data, the contents of a server, or information that specifies the design of objects.

For high quality website hosting services please check cheap web hosting website.

Comments are closed.