Home  >  Article  >  Database  >  使用SQLServer模板来写规范的SQL语句

使用SQLServer模板来写规范的SQL语句

WBOY
WBOYOriginal
2016-06-07 15:51:491130browse

如果你经常遇到下面的问题,你就要考虑使用SQL Server的模板来写规范的SQL语句了: SQL初学者。 经常忘记常用的DML或是DDL SQL 语句。 在多人开发维护的SQL中,每个人都有自己的SQL习惯,没有一套统一的规范。 在SQL Server Management Studio中,已经给大家

如果你经常遇到下面的问题,你就要考虑使用SQL Server的模板来写规范的SQL语句了:

  1. SQL初学者。
  2. 经常忘记常用的DML或是DDL SQL 语句。
  3. 在多人开发维护的SQL中,每个人都有自己的SQL习惯,没有一套统一的规范。

在SQL Server Management Studio中,已经给大家提供了很多常用的现成SQL规范模板。

SQL Server Management Studio->View(视图)->template explorer(模板浏览器)。如下图:

使用SQLServer模板来写规范的SQL语句

 

以其中的建表模板为例,生成的模板SQL为:

使用SQLServer模板来写规范的SQL语句

 

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn