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

最新活動:電腦PC端+手機端+微網(wǎng)站+自適應(yīng)網(wǎng)頁多模板選擇-建站388元起價!!!
當(dāng)前位置:主頁 > 網(wǎng)站建設(shè) > oracle下巧用bulk collect實現(xiàn)cursor批量fetch建站知識

oracle下巧用bulk collect實現(xiàn)cursor批量fetch建站知識

時間:2023-05-22 19:05:22 閱讀: 文章分類: 網(wǎng)站建設(shè) 作者: 網(wǎng)站技術(shù)員

導(dǎo)讀:1建站知識oracle下巧用bulk collect實現(xiàn)cursor批量fetch的sql語句,使用oracel的朋友可以試試了建設(shè)網(wǎng)站公司如何seo優(yōu)化推廣網(wǎng)站。

建設(shè)網(wǎng)站公司如何seo優(yōu)化推廣網(wǎng)站在一般的情況下,使用批量fetch的幾率并不是很多,但是Oracle提供了這個功能我們最好能熟悉一下,說不定什么時候會用上它。 

復(fù)制代碼 代碼如下:

declare  cursor c1 is select * from t_depart;  v_depart t_depart%rowtype ;  type v_code_type is table of t_depart.depart_code%type ;  v_code v_code_type ;  type v_name_type is table of t_depart.depart_name%type ;  v_name v_name_t建設(shè)網(wǎng)站ype ;  begin  open c1;  fetch c1 bulk collect into v_code , v_name ;  for i in 1..v_code.count loop  dbms_output.put_line(v_code(i)||' '||v_name(i));  end loop;&nb網(wǎng)seo優(yōu)化趨勢sp;  close c1;   end; 

通過上面的這個列子大家可以發(fā)現(xiàn)如果列很多的話,為每一列定義一個集合似乎有些繁瑣,可以把集合和%rowtype結(jié)合起來一起使用簡化程序! 

復(fù)制代碼 代碼如下:

declare  cursor c1 is select * from t_depart;  type v_depart_type is table of t_depart%rowtype ;  v_depart v_depart_type ;  begin  open c1;  fetch c1 bulk collect into v_depart ;  for i in 1..v_depart.count loop  dbms_output.put_line(v_depart(i).depart_code||' '||  v_depart(i).depart_name);  end loop;   close c1;   end; 

在輸出結(jié)果時既可以使用集合的count屬性和可以使用first和last,在引用%rowtype類型的內(nèi)容時還有一個需要注意的地方是v_depart(i).depart_code,而不是v_depart.depart_code(i),當(dāng)然沒有這樣的寫法,即使有seo網(wǎng)站優(yōu)化意義也并不一樣。  

復(fù)制代碼 代碼如下:

declare  cursor c1 is select * from t_depart;  type v_depart_type is table of t_depart%rowtype ;  v_depart v_depart_type ;  begin  open c1;  fetch c1 bulk collect into v_depart ;  for i in v_depart.first..v_depart.last loop  dbms_output.put_line(v_depart(i).depart_code||' '||  v_depart(i).depart_name);  end loop;   close c1;   end; 

 相關(guān)建設(shè)網(wǎng)站公司如何seo優(yōu)化推廣網(wǎng)站。

關(guān)鍵詞標(biāo)簽: 批量 巧用

聲明: 本文由我的SEOUC技術(shù)文章主頁發(fā)布于:2023-05-22 ,文章oracle下巧用bulk collect實現(xiàn)cursor批量fetch建站知識主要講述批量,巧用,oracle下巧用bulk collect實現(xiàn)c網(wǎng)站建設(shè)源碼以及服務(wù)器配置搭建相關(guān)技術(shù)文章。轉(zhuǎn)載請保留鏈接: http://www.bifwcx.com/article/web_5080.html

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

    主站蜘蛛池模板: 南汇区| 开封县| 肥乡县| 新化县| 灌阳县| 兴仁县| 溧阳市| 惠安县| 满城县| 时尚| 沽源县| 台州市| 凤山市| 青铜峡市| 策勒县| 神农架林区| 邵阳县| 木兰县| 遵义市| 济源市| 天气| 临邑县| 新和县| 宁陵县| 内丘县| 芜湖市| 潼南县| 邳州市| 建湖县| 阳东县| 嘉峪关市| 南昌县| 马龙县| 中卫市| 子洲县| 剑川县| 荆州市| 根河市| 勃利县| 灵寿县| 锦州市|