How to quickly format SQL Server code

Source: Internet
Author: User
Tags sql server management
In SQL Server we often need to write a variety of SQL scripts, such as stored procedures and functions, because in the writing process, often adjust, some of the keywords we use uppercase, some we use the lowercase, some end use; For people with obsessive-compulsive disorder, it's very painful to look at code like this, and you have to manually format the code, which can be very time-consuming and laborious if the code script is much more. So the question is, how to quickly format the code in SQL Server.

I searched the internet a bit, read a foreign article said a tool apexsql, is a SQL Server Management tool plug-in, is free of charge, download down the trial, feel good. Here to share with you.

After downloading and installing, you can see the ApexSQL menu in the SQL Server Administration tool:

You can see that the default formatting shortcuts are ctrl+shift+alt+f, in the default format configuration (options under the ApexSQL menu ... ) can be modified:

Here is an example, as shown in. The left is unformatted script and the right side is the formatted script:

How to quickly format SQL Server code

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.