什么是动态SQL查询,什么时候要使用它? [英] What is a dynamic SQL query, and when would I want to use one?
本文介绍了什么是动态SQL查询,什么时候要使用它?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
什么是动态SQL查询,什么时候要使用它?我正在使用SQL Server 2005。
What is a dynamic SQL query, and when would I want to use one? I'm using SQL Server 2005.
推荐答案
这里有几篇文章:
- Introduction to Dynamic SQL
- Dynamic SQL Beginner's Guide
从动态SQL入门:
动态SQL 是一个术语,用于表示由您以编程方式(部分或全部)生成的SQL代码程序在执行之前。结果,它是一个非常灵活而强大的工具。您可以使用动态SQL完成诸如根据表单上填写的字段在搜索中添加where子句或创建具有不同名称的表之类的任务。
Dynamic SQL is a term used to mean SQL code that is generated programatically (in part or fully) by your program before it is executed. As a result it is a very flexible and powerful tool. You can use dynamic SQL to accomplish tasks such as adding where clauses to a search based on what fields are filled out on a form or to create tables with varying names.
这篇关于什么是动态SQL查询,什么时候要使用它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文