SQL 语句
1.在insert 语句中返回刚插入的数据某字段的值
output inserted.XXX
2.分页
select * from(select ROW_NUMBER() over(order by DT_UPLOADTIME desc) as num, * from Photo )
as tbl
where tbl.num between (@pageIndex-1)*pageNum+1 and @pageIndex*@pageNum
pageIndex:表示当前页 pageNum:表示每页显示的条数