今天开发任务稍微松缓一点,所以有时间在园里面看了几篇博客,看到有人写了sql语法汇总,开发过程中用数据库比较平凡,所以决定花点时间总结一下平时所学所用,也以便日后工作中不记得时查阅。T-sql也是一门查询语言,内容比较多,一时间无法全部总结全面,之后我会随着日后工作中常用的抽时间来一一总结。一、创建表与删除表 1.1代码1.创建表:create table Person5(Id int not null,Name nvarchar(50),Age int null)2.删除表:drop table person4; 1.2分析 1)create实现在代码中直接生成表,表的字段可以再表... Read More
posted @ 2012-06-15 16:55 tangrongyue Views(276) Comments(0) Diggs(0) Edit
参考资料:http://www.apoints.com/web/wzjc/jiqiao/200508/5751.html Read More
posted @ 2012-06-15 15:35 tangrongyue Views(585) Comments(0) Diggs(0) Edit
首先要定义四个变量:int pageSize:每页显示多少条记录int pageNow:希望显示第几页int pageCount:一共有多少页int rowCount:一共有多少条记录说明:pageSize是指定的 pageNow是用户选择的rowCount是计算出来的 该计算式为if(rowCount%pageSize==0){pageCount=rowCount/pageSize;}else{pageCount=rowCount/pageSize+1;}(技巧:数据库插入:insert into 表名(字段1,2,。。。)select 字段1,2,...from 表名)查询语句select Read More
posted @ 2012-06-15 14:11 tangrongyue Views(43993) Comments(0) Diggs(0) Edit
一、将网页资料以excel报表以线上浏览方式呈现<%@ page contentType="application/msexcel" %><% response.setHeader("Content-disposition","inline; filename=test1.xls"); //以上这行设定传送到前端浏览器时的档名为test1.xls //就是靠这一行,让前端浏览器以为接收到一个excel档 %>Excel档案呈现方式姓名身份证字号生日李玟N1111111111900/11/12梁静如N222222 Read More
posted @ 2012-06-15 11:54 tangrongyue Views(1010) Comments(0) Diggs(0) Edit