当前位置:首页 » 编程博文
开发技术指南» 文章正文
    引言: November 5, 2003T-SQL Programmin
 

 

    摘要:/* 利用"委托"实现对象实例按"多字段嵌套"排序 (不知道大家看懂题目了? 功能还是挺实用的!) 本文实现 person 类的实例们按 年龄、身高、体重等字段嵌套排序! 就像 sql 查询的 order by 字段1,字段2,...,字段n 子句的效果一样! */ using system; class class1 //客......
    摘要:office 12 beta 1 – may 2005 windows longhorn beta 1 – june 2005 windows longhorn server beta 1 – june 2005 office 2006 beta 2 – november 2005 windows 2006 beta 2 – ja......


Building a T-SQL Loop
november 5, 2003

t-sql programming part 2 - building a t-sql loop 【程序编程相关:使用PB调用API自动更新(非FTP模式

【推荐阅读:梦网模式下的sp生存

by gregory a. larsen 【扩展信息:软件架构师之我见

this is the second article in my t-sql programming series. this article will discuss building a program loop using t-sql. in addition to talking about building a loop, i will also discuss ways of controlling the loop processing, and different methods to break out of a loop.

a programming loop is a chunk of code that is executed over and over again. in the loop some logic is executed repeatedly in an iterative fashion until some condition is met that allows the code to break out of the loop. one example of where you might use a loop would be to process through a set of records one record at a time. another example might be where you need to generate some test data and a loop would allow you to insert a record into your test data table with slightly different column values, each time the loop is executed. in this article i will discuss the while, break, continue, and goto statements.

while statement

in t-sql the while statement is the most commonly used way to execute a loop. here is the basic syntax for a while loop:

while <boolean expression> <code block>

where a <boolean expression> is any expression that equates to a true or false answer, and the <code block> is the desire code to be executed while the <boolean expression> is true. let´s go through a real simple example.


...   下一页
    摘要:本文可能语言过激,而且含沙射影,但请勿对号入座。 无可否认,2003年到至今,cisco的ccie证书有量产的倾向,这种情况得益于中国人民开始热衷网络技术以及各种国内培训班的“雨后春笋”般的诞生。笔者没有参加过任何机构办的任何培训班,但是本人或多或少的接触了一些从对网络技术一知半解,然后成功通过ccie考试的朋友,用时只有短短半年光阴。问他们何以如此顺利拿到含金量不低的c......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE