首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

请帮小弟我把这条sql改写成存储过程

2012-03-23 
请帮我把这条sql改写成存储过程select top 10* from(select deviceID,Licenseplatmin(Licenseplat),vehic

请帮我把这条sql改写成存储过程
select top 10* from
  (select deviceID,Licenseplat=min(Licenseplat),vehicletype=min(vehicletype),
  owner=min(owner),ownertel=min(ownertel),driverName=min(driverName),
  driverTel=min(driverTel),maxloadlength=min(maxloadlength),
  maxloadwidth=min(maxloadwidth),transportationline=min(transportationline)
  from logistics_carsInfo group by deviceID)lc
  where Licenseplat not in (select top 20* from (select distinct Licenseplat from logistics_carsInfo) lcs)


这句sql是一页显示10条数据,并且不能重复,我写的是sql,但是要我写成存储过程,怎么写呢?写不来 
 
 
 
 


[解决办法]
搜索分页存储过程 懒得贴。
[解决办法]
小F 那有通用存储过程 问他要一个...

热点排行
Bad Request.