SQL语句返回排序后的位置
可惜SQL SERVER没有直接查看结果集中某行所在位置的功能,只能借助临时表了。分享弹窗注入源码错误以下语句同时执行:
if exists(select * from sysobjects where name ='temp_for_insert' )
begin
drop table temp_for_insert
end
select identity(int,微信+论坛+源码1,1) as rowid,id,name,addtime
into temp_for_insert
from [users]
where addtime between '' and ''
order by addtime
select
*from temp_for_insert
drop table temp_for_insert
注意,如果users表中原来有自增的推广注册+网站源码列的话,需要在select into的rtos+dhcp+源码时候转换一下,比如id列是freescada+c+源码自增的,语句就是
select identity(int,1,1) as rowid,cast(id as int) as id,name,addtime
into temp_for_insert
from [users]
where addtime between '' and ''
order by addtime
where addtime between '' and ''
是限定时间段的。
2024-12-29 04:21
2024-12-29 04:14
2024-12-29 03:56
2024-12-29 03:38
2024-12-29 02:54