It can have many arguments in the declaration. User must use one as the table name for checking the column value.

Execute the following code to demonstrate the use of the student table.

Code:

sp_columns student
GO

The output generated after executing the stored procedure is as shown below:

7. Server Information

When user needs the information about the server, the sp_monitor stored procedure is used. There are several value generated which helps user to analyze the CPU functionality.

The following code is executed to view the server information.

Code:

sp_monitor;
GO

The output generated after executing the procedure is as shown below:

In the above result, the values as the CPU status, packets information, connections related to the specific server are displayed.

8. Updating View

User can refresh the view using the sp_refreshview stored procedure. The syntax for the stored procedure is as shown below:

Code:

sp_refreshview [ @viewname = ] 'viewname'

viewname is the name of the view.

The following code is used to refresh the view.

Code:

sp_refreshview view1;
GO

9. Deleting user defined data type

Sometimes user creates a custom data type for the database. When user does not need the data type, it can be removed as sp_droptype stored procedure. The syntax for the stored procedure is as shown below:

Code:

sp_droptype [ @typename= ] 'type'

[ @typename= ] 'type' is the name of the user defined data type. It returns the value as 0 or 1.

The example to demonstrate the use of stored procedure is as shown below:

Code:

sp_droptype OddNumber;
GO

10. Automated stored procedure option

The stored procedures execute and the results are generated later. There are requirements when user wants to execute the procedure automatically. The sp_procoption stored procedure is used.