Generate SQL statement (via SQL Server Enterprise Manager)

Source: Internet
Author: User
Query:
When there are too many tables to be queried, it is annoying to manually write SQL statements. One way is to right-click the table, open the table, and query it. In addition, there are multiple table links, left join, etc,
Modify the table result dynamically. First, press the table designer to modify the table. Then, when you click the script icon of the tool class, the Enterprise Manager will automatically generate the required Code,
Another
An SQL statement for getting table information

Select
Field name = A. Name,
Type = B. Name,
Bytes occupied = A. length,
Field description = isnull (G. [value], '')
From syscolumns a left join policypes B on A. xtype = B. xusertype
Inner join sysobjects D on A. ID = D. id
And D. xtype = 'U' and
D. Name = 'info'
Left join sysproperties g on A. ID = G. ID and A. colid = G. smallid
Order by A. colorder

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.