CREATE PROCEDURE [dbo].[dxd_mx]
@dxd_id VARCHAR(120)=''
AS
BEGIN
--set nocount on
declare @sql1 nVARCHAR(4000)
SET @sql1='select * from (SELECT ROW_NUMBER() OVER(ORDER BY t1.n ASC) AS m1,* from (SELECT ROW_NUMBER() OVER(ORDER BY id DESC) AS n, ID,dxd_id, yqs,yhs,guanghao FROM lxcy_dxd_mx_v WHERE dxd_id='''+@dxd_id+''' or dxd_id='''') t1 WHERE n<=30)tt1
LEFT JOIN
(SELECT ROW_NUMBER() OVER(ORDER BY t2.n ASC) AS m2,* from (SELECT ROW_NUMBER() OVER(ORDER BY id DESC) AS n, ID,dxd_id, yqs,yhs,guanghao FROM lxcy_dxd_mx_v WHERE dxd_id='''+@dxd_id+''' or dxd_id='''') t2 WHERE n BETWEEN 31 AND 60)tt2
on m1=m2'
EXEC sp_executesql @sql1
RETURN
END
創(chuàng)新互聯(lián)公司主營溧水網(wǎng)站建設的網(wǎng)絡公司,主營網(wǎng)站建設方案,成都app軟件開發(fā),溧水h5成都微信小程序搭建,溧水網(wǎng)站營銷推廣歡迎溧水等地區(qū)企業(yè)咨詢
本文題目:SQLServer數(shù)據(jù)分欄
轉(zhuǎn)載源于:http://vcdvsql.cn/article14/pegcde.html
成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供Google、全網(wǎng)營銷推廣、微信小程序、微信公眾號、移動網(wǎng)站建設、外貿(mào)網(wǎng)站建設
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)