07 2011 档案

摘要:CAST() 函数语法如下 CAST() (<expression> AS <data_ type>[ length ]) CONVERT() 函数语法如下 CONVERT() (<data_ type>[ length ], <expression> [, style]) select cast(100+99 as char) convert(varchar(12), getdate()) 运行结果如下 ------------------------------ ------------ 199 Jan 15 2000 ----日期函数--- 阅读全文
posted @ 2011-07-21 14:22 叮/当 阅读(391) 评论(0) 推荐(0)
摘要:大家都知道,Mysql 和 Oracle中都有可以实现LIMIT的方法,现在有了SQL:2003标准的分析函数,MSSQL 和DB2 都可以实现了使用SQL:2003标准中的分析函数(窗口函数): ROW_NUMBER() ,RANK(),DENSE_RANK()使用方法:SELECT row_number() over (order by autoid desc) as rownumber, autoid,userid, matype,maxrate,setrate FROM B_ProxySet由此获得连续编号的列,做为LIMIT范围列,不管Autoid列是连续还是中断的,下面是我引用该. 阅读全文
posted @ 2011-07-18 18:11 叮/当 阅读(4096) 评论(0) 推荐(0)
摘要:其实要实现这个功能主要还是要用到javascript 方法一: 在asp.net的aspx里面的源代码中 <input type="button onclick="javascript:window.history.go(-1);"value="返回上一页"> 浅析:这个是用了HTML控件,通过一个onclick的事件,调用了javascript中的一个方法就可以了。这个是最简单的了,也同样适用... 阅读全文
posted @ 2011-07-13 18:51 叮/当 阅读(192) 评论(0) 推荐(0)
摘要:在SQL Server中利用 FOR XML PATH 语句能够把查询的数据生成XML数据,下面是它的一些应用示例。view sourceprint?1DECLARE @TempTable table(UserID int , UserName nvarchar(50)); 2insert into @TempTable (UserID,UserName) values (1,'a') 3insert into @TempTable (UserID,UserName) values (2,'b') 45select UserID,UserName from @T 阅读全文
posted @ 2011-07-09 09:48 叮/当 阅读(249) 评论(0) 推荐(0)
摘要:create table tb(id int,fid int,name nvarchar(10)) insert into tb select 1,0,'百度知道' insert into tb select 2,1,'电脑/网络' insert into tb select 3,2,'程序设计' insert into tb select 4,3,'数据库程序设计' insert into tb... 阅读全文
posted @ 2011-07-09 09:39 叮/当 阅读(320) 评论(0) 推荐(0)
摘要:当您使用连接池连接到 SQL Server 时,SQL Server 将调用 sp_reset_connection 存储过程来重用之前池中的连接。 (在.NET中是由.Net SqlClient Data Provider调用) 使用 sp_reset_connection 存储过程可确保连接选项被重置, 使 客户端应用程序 重用 在以前的语句中所创建的 已没有持续 的 连接。 然而,在 ... 阅读全文
posted @ 2011-07-08 18:38 叮/当 阅读(2911) 评论(0) 推荐(0)