Stored procedures for SQL Server

Source: Internet
Author: User

1.sp_databases lists all database information on the server, including the database name size.

Example: EXEC sp_databases

2.SP_HELPDB reports information about a specified database or all databases.

Cases:

EXEC sp_helpdb

3.sp_renamedb Changing the database name

Example: Exec sp_renamedb ' myschool ', ' Wode '

4.sp_tables returns information about a table or view that can be queried in the current environment.

Example: Exec sp_tables

5.sp_columns returns information about the columns of a table or view, including the data type and length.

Example: EXEC sp_columns Grade

6.sp_help View a Database object information.

Example: EXEC sp_help

7.sp_helpconstraint view constraints on a table.

Example: Exec sp_helpconstraint Grade

8.sp_helpindex View the index of a table.

Example: Exec sp_helpindex Grade

9.sp_stored_procedures displays a table of stored procedures.

10.sp_password Add or modify the password for the login account.

Stored procedures for SQL Server

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.