久久机这里只有精品,国产69精品一区二区亚洲孕妇,91精品国产综合久久婷婷香蕉,午夜久久久久久电影

最新活動(dòng):電腦PC端+手機(jī)端+微網(wǎng)站+自適應(yīng)網(wǎng)頁多模板選擇-建站388元起價(jià)!!!
當(dāng)前位置:主頁 > 網(wǎng)站建設(shè) > oracle 分頁 很棒的sql語句建站知識(shí)

oracle 分頁 很棒的sql語句建站知識(shí)

時(shí)間:2023-05-22 22:05:22 閱讀: 文章分類: 網(wǎng)站建設(shè) 作者: 網(wǎng)站編輯員

導(dǎo)讀:1建站知識(shí)oracle 分頁 很棒的實(shí)現(xiàn)方法,大家可以分析下。百度seo網(wǎng)站優(yōu)化網(wǎng)站建設(shè)制作。

百度seo網(wǎng)站優(yōu)化網(wǎng)站建設(shè)制作CREATE OR REPLACE PROCEDURE PROC6338196642095312503719(輸入新聞主題 Varchar2,輸入新聞內(nèi)容 Varchar2,輸入發(fā)布時(shí)間 Varchar2,輸入當(dāng)前頁碼 Number,輸入每頁行數(shù) Number,輸出當(dāng)前頁碼 OUT Number,輸出總行行數(shù) OUT Number,輸出總頁頁數(shù) OUT Number,輸入是否下頁 Number,輸入新聞編號(hào) Varchar2網(wǎng)站建設(shè)哪家好,RETURN_CURSOR OUT CUSTOMTYPE.MYRCTYPE) --功能描述: --編寫人: --編寫日期: --如果返回結(jié)果集,必須使用自定義游標(biāo)Return_Cursor IS --OR AS --變量定義區(qū) v_cPageCount integer; -- 要顯示的數(shù)據(jù)總行數(shù) v_cPage integer; -- 要顯示數(shù)據(jù)的當(dāng)前頁 BEGIN --存儲(chǔ)過程主體 if 輸入新聞編號(hào) is null then begin --- 輸出總行行數(shù) select max(rownum) into 輸出總行行數(shù) from( select * from xtnews where 1=1 and 輸入新聞主題 is null or (輸入新聞主題 is not null and V_XWZT like '%'||輸入新聞主題||'%') and 輸入發(fā)布時(shí)間 is null or (輸入發(fā)布時(shí)間公司網(wǎng)站建設(shè) is not null and D_FBSJ = to_date(輸入發(fā)布時(shí)間,'yyyy-mm-dd')) )where 輸入新聞內(nèi)容 is null or (輸入新聞內(nèi)容 is not null and V_XWNR like '%'||輸入新聞內(nèi)容||'%'); -- 輸出總頁頁數(shù) select ceil(輸出總行行數(shù)/輸入每頁行數(shù)) into 輸出總頁頁數(shù) from dual; exception when no_data_found then null; end; -- 計(jì)算 輸入當(dāng)前頁碼 要顯示的數(shù)據(jù)總行數(shù) if 輸入當(dāng)前頁碼 is not null then -- xia一頁 if 輸入是否下頁 = 1 then -- 計(jì)算 獲取數(shù)據(jù)的當(dāng)前頁 v_cPage := (輸入當(dāng)前頁碼 + 1); -- 最后一頁 if v_cPage > 輸出總頁頁數(shù) then v_cPage := 輸出總頁頁數(shù); end if; end if; -- shang一頁 if 輸入是否下頁 = 0 then -- 計(jì)算 獲取數(shù)據(jù)的當(dāng)前頁 v_cPage := (輸入當(dāng)前頁碼 - 1); -- 最前一頁 if v_cPage = 0 then v_cPage := 1; end if; end if; -- 要顯示的數(shù)據(jù)總行數(shù) v_cPageCount := v_cPage * 輸入每頁行數(shù); end if; end if; -- 執(zhí)行查詢 獲取 要顯示的數(shù)據(jù) begin open return_cursor for select nts.* from( select nt.* from ( select rownum 序號(hào),n.* from( select * from( select * from( select I_ID 新聞編號(hào), V_XWZT 新聞主題, V_XWNR 新聞內(nèi)容, D_FBSJ 發(fā)布時(shí)間, D_YXSJ 有效時(shí)間, V_FBBM 發(fā)布部門 from xtnews where 1=1 a網(wǎng)站建設(shè)制作nd 輸入新聞主題 is null or (輸入新聞主題 is not null and V_XWZT like '%'||輸入新聞主題||'%') )where 輸入新聞內(nèi)容 is null or (輸入新聞內(nèi)容 is not null and 新聞內(nèi)容 like '%'||輸入新聞內(nèi)容||'%') )where 輸入發(fā)布時(shí)間 is null or (輸入發(fā)布時(shí)間 is not null and 發(fā)布時(shí)間 = to_date(輸入發(fā)布時(shí)間,'yyyy-mm-dd')) )n where 輸入新聞編號(hào) is null or (輸入新聞編號(hào) is not null and 新聞編號(hào) = 輸入新聞編號(hào)) order by rownum )nt where nt.序號(hào) <= v_cPageCount order by 序號(hào) desc )nts where nts.序號(hào) > (v_cPageCount-輸入每頁行數(shù)) order by 序號(hào); exception when no_data_found then null; end; -- 輸出最后計(jì)算的當(dāng)前頁碼 if 輸入新聞編號(hào) is null and v_cPage is not null then 輸出當(dāng)前頁碼 := v_cPage; end if; END;相關(guān)百度seo網(wǎng)站優(yōu)化網(wǎng)站建設(shè)制作。

關(guān)鍵詞標(biāo)簽: 分頁 很棒

聲明: 本文由我的SEOUC技術(shù)文章主頁發(fā)布于:2023-05-22 ,文章oracle 分頁 很棒的sql語句建站知識(shí)主要講述分頁,很棒,oracle 分頁 很棒的sql語句建站知識(shí)1網(wǎng)站建設(shè)源碼以及服務(wù)器配置搭建相關(guān)技術(shù)文章。轉(zhuǎn)載請(qǐng)保留鏈接: http://www.bifwcx.com/article/web_5404.html

我的IDC 網(wǎng)站建設(shè)技術(shù)SEOUC.COM
專注網(wǎng)站建設(shè),SEO優(yōu)化,小程序設(shè)計(jì)制作搭建開發(fā)定制網(wǎng)站等,數(shù)千家網(wǎng)站定制開發(fā)案例,網(wǎng)站推廣技術(shù)服務(wù)。
  • 5000+合作客服
  • 8年從業(yè)經(jīng)驗(yàn)
  • 150+覆蓋行業(yè)
  • 最新熱門源碼技術(shù)文章

    主站蜘蛛池模板: 合肥市| 独山县| 宝鸡市| 旺苍县| 冷水江市| 府谷县| 洪湖市| 黄龙县| 南昌县| 平和县| 濮阳县| 苍山县| 永修县| 吉木乃县| 昌黎县| 横山县| 九台市| 景东| 光山县| 北川| 如皋市| 乡宁县| 中方县| 宿松县| 彭州市| 泰安市| 永寿县| 江源县| 徐汇区| 宁化县| 奉新县| 韶山市| 湘潭市| 思南县| 瑞金市| 阜城县| 城固县| 湖北省| 泽州县| 雷州市| 龙海市|