当前位置: 代码迷 >> SQL >> sqlserver 现阶段行号
  详细解决方案

sqlserver 现阶段行号

热度:35   发布时间:2016-05-05 14:06:36.0
sqlserver 当前行号

select p.patient_id "病人ID",       p.admiss_times "访问ID",       p.bed_no "床号",       p.bed_no "床号别名",       p.name "姓名",       p.admiss_physician "责任医生",       p.admiss_type "护理等级",       0 as "发烧次数",       p.admiss_status "病人状态",       p.charge_type "费别",        ROW_NUMBER() over(order by p.bed_no)-1 as  "病人索引",        p.admiss_date "入科时间"   from [hisdbth].[dbo].[zy_actpatient] p      where p.ward = '1150107' order by p.bed_no
?
  相关解决方案