`

游标的使用

阅读更多
declare 
 cursor cc is select id,distinct productcode,element from TKL_PRODUCT_CONTENT  where state =1;
 ccrec cc%rowtype;
 begin
    for ccrec in cc 
	 loop
      	  update TKL_PRODUCT_CONTENT_VICE set id =ccrec.id where productcode = ccrec.productcode and element = ccrec.element
   	 end loop;
 end;
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics