本人的Blog更新:http://www.iwllsea.com/default.asp?cateID=13,涉及更多SQLServer文章,希望对大家有所帮助。
//
简要说明该文档内容
本篇文档主要介绍如何在查询分析器中使用模板生成脚本(Insert、Update、Select、SP)。
1、
使用模板
1、使用模板
1.1、 从对象浏览器中插入模板
1.1.1、查看模版
![](https://p-blog.csdn.net/images/p_blog_csdn_net/WillSea/90e01a2ef75e48af8f963210fc1b0027.png)
1.1.2、插入模板
![](https://p-blog.csdn.net/images/p_blog_csdn_net/WillSea/d5924418b37947a9b79d2cfa9e14a7fb.png)
1.2、 或者从文件中插入模板
![](https://p-blog.csdn.net/images/p_blog_csdn_net/WillSea/cd2c4dd4b29c40ecbc974afade17ad5d.png)
或者从菜单栏插入:
![](https://p-blog.csdn.net/images/p_blog_csdn_net/WillSea/4b3ede95808e4fa9a28ddc3ca366c7b4.png)
![](https://p-blog.csdn.net/images/p_blog_csdn_net/WillSea/161ded5f929044f2bd3b329b573317b8.png)
1.3、 替换模板中的参数
![](https://p-blog.csdn.net/images/p_blog_csdn_net/WillSea/43f0f4a846f44fb49e44457e0f5041e9.png)
1.3.1、从菜单栏打开“替换模板参数”对话框
![](https://p-blog.csdn.net/images/p_blog_csdn_net/WillSea/92b272e20d514f42bcefa85255ff1a92.png)
1.3.2、替换参数
![](https://p-blog.csdn.net/images/p_blog_csdn_net/WillSea/f1f985b36cac4dab80c160c406bf57dd.png)
1.3.3、替换完成后就成为我们需要的脚本
![](https://p-blog.csdn.net/images/p_blog_csdn_net/WillSea/c87fc4c379d24afa98eea44556225409.png)