SqlServer游标示例
declare @areaid varchar(100)
declare @areaname varchar(100)
declare Cur cursor for
select code as areaID,[name] as areaName from dbo.province
open Cur
Fetch next from Cur Into @areaid,@areaname
While @@fetch_status=0
Begin
print('insert into tb_area(areaid,areaname) values(' +@areaid +',''' + @areaname +''')')
Fetch Next from Cur Into @areaid,@areaname
End
Close Cur
Deallocate Cur
相关文档:
Oracle笔记
l 关于TRUNC函数
SELECT
RELATED_ID ,
DOC_ID ,
CAT_ID ,
CAT_CODE ,
RELEASE_DATE ,
&n ......
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/yf520gn/archive/2008/09/26/2982363.aspx
SELECT * from TB_MILES_CB_ORDER
WHERE convert(varchar(100),ORDER_DATE,102)= ?
ORDER BY ORDER_NO
SELECT CONVERT(varchar(100), GETDATE(), 0): 05 16 2006 10:57AM
SELECT CONVERT(varchar(100), GETDATE ......
package com.wfy.system.dao;
import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Types;
......
SQLServer2005通过intersect,union,except和三个关键字对应交、并、差三种集合运算。
他们的对应关系可以参考下面图示
相关测试实例如下:
use tempdb
go
if (object_id ('t1' ) is not null ) drop table t1
if (object_id ('t2' ) is not null ) drop table t2
go
cre ......
有外来程序安装基于.NET FRAMEWORK 3.5的应用程序在内网的PC上,需要通过ISA防火墙客户端经过服务器上的ISA2006 SP1访问外网的SQLSERVER2005数据库。
按照以往经验,需要配置一条SQLSERVER2005服务器所在的IP地址的出站规则,并且并不需要设置一条基于域名的规则。
&nb ......