上一页 1 ··· 42 43 44 45 46 47 48 49 50 ··· 63 下一页
摘要: update b set b.fprice=c.fprice , b.fauxprice=c.fprice , b.FAmount=b.FQty*b.FPricefrom icstockbillentry b inner join icstockbill a on a.FInterID=b.FInt 阅读全文
posted @ 2018-03-30 15:05 WhiteSpace 阅读(338) 评论(0) 推荐(0) 编辑
摘要: xp_cmdshell --*执行DOS各种命令,结果以文本行返回。 xp_fixeddrives --*查询各磁盘/分区可用空间 xp_loginconfig --*报告SQL Server 实例在Windows 上运行时的登录安全配置 xp_logininfo --*返回有关Windows 认证登录的信息。 xp_msver --*返回有关Microsoft SQL Server 的... 阅读全文
posted @ 2018-03-30 14:59 WhiteSpace 阅读(1052) 评论(0) 推荐(0) 编辑
摘要: declare @a varchar(200) --定义一个变量来接收读取之后储存用 declare txt cursor scroll for --定义一个txt游标参数为scroll,没有这个参数游标只能next select fitemid from t_icitem --在这个查询集合里面,这里面的列只能是一个,如果是两个还要定义一个变量 open txt fetch fi... 阅读全文
posted @ 2018-03-30 14:58 WhiteSpace 阅读(1106) 评论(0) 推荐(0) 编辑
摘要: 在windows选择‘运行’vista需要以管理员身份运行,打开命令提示符窗口 要连接到sql server服务器,必须指定服务器名称,安装命名实例中的,还必须指定实例名。默认情况下,sqlcmd使用windows身份验证。如果要使用sqlserver身份验证连接到sql server的,则还必须提 阅读全文
posted @ 2018-03-30 14:58 WhiteSpace 阅读(1351) 评论(0) 推荐(0) 编辑
摘要: 第一种方式 -定义游标text_cursor 关联表t_icitem 基表 declare text_cursor cursor scroll for select * from t_icitem --打开游标text_cursor open text_cursor --读取游标 第一行(first) 在text_cursor游标中 fetch first from text_cursor -... 阅读全文
posted @ 2018-03-30 14:57 WhiteSpace 阅读(357) 评论(0) 推荐(0) 编辑
摘要: declare auth_cur cursor scroll for select au_id, au_lname, au_fname, state from authors for update of au_lname open auth_cur declare @rowcount int set 阅读全文
posted @ 2018-03-30 14:56 WhiteSpace 阅读(762) 评论(0) 推荐(0) 编辑
摘要: use pubs Go declare @auid char(12),@aulname varchar(20),@aufname varchar(20), @st char(2),@auinfo varchar(50) declare auth_cur cursor for select au_id, au_lname, au_fname, state from authors open aut... 阅读全文
posted @ 2018-03-30 14:55 WhiteSpace 阅读(313) 评论(0) 推荐(0) 编辑
摘要: 关闭游标是指使用close语句关闭游标释放数据绝国际和定位数据记录的锁,游标关闭后,不会释放游标占用的数据结构,可以使用open语句再次打开。 语法: close <游标名称> close <mycursor> 阅读全文
posted @ 2018-03-30 14:54 WhiteSpace 阅读(957) 评论(0) 推荐(0) 编辑
摘要: 释放游标是指使用deallocate语句删除游标并释放其占用的所有系统资源。 语法: Deallocate <游标名称> 游标的类型: 1、静态游标(不检测数据行的变化) 2、动态游标(反映所有数据行的改变) 3、仅向前游标(不支持滚动) 4、键集游标(能反映修改,但不能准确反映插入、删除) 游标使 阅读全文
posted @ 2018-03-30 14:54 WhiteSpace 阅读(459) 评论(0) 推荐(0) 编辑
摘要: 读取游标是指使用fetch语句从打开的游标中逐行读取数据,以进行相关处理 语法: fetch {[first|last|prior|next|relative|absolute n]} from <游标名> [Into @<变量> [,….n]] First :返回游标中第一行,并将其设为当前行。 阅读全文
posted @ 2018-03-30 14:53 WhiteSpace 阅读(537) 评论(0) 推荐(0) 编辑
上一页 1 ··· 42 43 44 45 46 47 48 49 50 ··· 63 下一页