02 2011 档案

摘要:1. select ... into new_tablename where ... 2. insert (into) old_tablename select ... from ... where ... 区别是前者把数据插入一个新表(先建立表,再插入数据),后者是把数据插入已经存在的一个表中,我个人喜欢后者,因为在编程的结构上,应用的范围上,第二条语句强于前者。 (注意 如果包含主键则报"仅当使用了列列表并且 IDENTITY_INSERT 为 ON 时,才能为表'dbo.fuzhi'中的标识列指定显式值。"这个错误) 阅读全文
posted @ 2011-02-28 14:36 清凉的风/2.0 阅读(199) 评论(0) 推荐(0)
摘要://数字交互法应用 protected void Button1_Click(object sender, EventArgs e) { int[] numbers = new int[5] { 2, 1, 7, 5, 4 }; for (int i = 0; i < GetSort(numbers).Length; i++) { Response.Write(numbers[i]); } } //数字交互 public int[] GetSort(int[] Numbers) { int i, j, temp; bool b = false;//状态标识 for (i = 0; i & 阅读全文
posted @ 2011-02-23 16:31 清凉的风/2.0 阅读(219) 评论(0) 推荐(0)