SQL
忆龙2009
7日教你学会OPENGL开发3D游戏
展开
-
忆龙2009:自动计算相邻两条记录指定字段的差值
select a.*, a.lottery_idx - b.lottery_idx as delta_period from dbo.GetAllRecordByResult('555') a left join dbo.GetAllRecordByResult('555') b on a.id = b.id + 1 select a.*, a.lottery_idx - b.lottery_id原创 2012-10-13 00:51:50 · 1066 阅读 · 0 评论 -
忆龙2009:SQL查询自动生成ID列
use lottery3D if OBJECT_ID('dbo.GetAllRecordByResult','IF') is not null drop function dbo.GetAllRecordByResult; go create function dbo.GetAllRecordByResult(@result nvarchar(3)) retur原创 2012-10-13 00:39:23 · 1249 阅读 · 0 评论