存储过程
时间:2011-12-14
来源:互联网
create proc [color=#FF0000]GetCounty[/color] @startIndex int, @endIndex int as with 日志表 as (select row_number() over(order by o_id) as rowIndex,* from [color=#FF0000]County[/color]) select * from 日志表 where rowIndex between @startIndex and @endIndex go
这个是想做的真分页,谁能帮我解释下County
原代码
SQL code
create procedure sp_Paging_GetCounty @startIndex int, @endIndex int as with table_temp as (select row_number() over(order by o_id) as rowIndex,* from County) select * from table_temp where rowIndex between @startIndex and @endIndex go
作者: hy63171234 发布时间: 2011-12-14
查询的表呗!
作者: qianjin036a 发布时间: 2011-12-14
County?
查询的表呗!
我放的表但是说是无效的
作者: hy63171234 发布时间: 2011-12-14
作者: qianjin036a 发布时间: 2011-12-14
你放这个存储过程的数据库中,有这个County 表吗?
SQL code
create procedure sp_Paging_GetCounty @startIndex int, @endIndex int as with table_temp as (select row_number() over(order by o_id) as rowIndex,* from County) select * from table_temp where rowIndex between @startIndex and @endIndex go
你能帮我详细解释下这个么 每个都代表什么
作者: hy63171234 发布时间: 2011-12-14
没看到哪有问题 ...
作者: ju523756055 发布时间: 2011-12-14
作者: lzd_83 发布时间: 2011-12-14
语句的语法没有问题的,关键的此数据库中是否有此表还有一个可能把存储过程建到别的库中了。
嗯
第一句是 创建了个临时表(多加了个行号)
第二句是 查询这个临时表
作者: ju523756055 发布时间: 2011-12-14
引用 6 楼 lzd_83 的回复:
语句的语法没有问题的,关键的此数据库中是否有此表还有一个可能把存储过程建到别的库中了。
嗯
第一句是 创建了个临时表(多加了个行号)
第二句是 查询这个临时表
懂了谢谢
作者: hy63171234 发布时间: 2011-12-14
楼主是想让解释一下这个语句的意思。还是怎的 ----创建一个存储过程名为 sp_Paging_GetCounty create procedure sp_Paging_GetCounty ---声明变量 @startIndex int, @endIndex int as ----创建一个重新生成一列rowindex临时表table_temp with table_temp as (select row_number() over(order by o_id) as rowIndex,* from County) ---根据条件查询临时表 select * from table_temp where rowIndex between @startIndex and @endIndex go
作者: lzd_83 发布时间: 2011-12-14
SQL code
楼主是想让解释一下这个语句的意思。还是怎的
----创建一个存储过程名为 sp_Paging_GetCounty
create procedure sp_Paging_GetCounty
---声明变量
@startIndex int,
@endIndex int
as
----创建一个重新生成一列rowindex临时表table_temp
wit……
over(order by o_id)
这个o_id 是County 的主键字段还是新表table_temp 的字段
作者: hy63171234 发布时间: 2011-12-14
这里的o_id是表County里的字段.是不是主键字段这要是看楼主的表是怎么设计的了
作者: chenguang79 发布时间: 2011-12-14
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28