Oracle´æ´¢¹ý³ÌÓα겻ÄÜÏÂÒÆ£¿ÎªÊ²Ã´£¿
ÎÒÊÇÏë°ÑÒ»ÕűíÀïµÄ¶àÌõ¼Ç¼µÄÈý¸ö×Ö¶ÎÐÞ¸ÄΪÁíÒ»ÕűíÀï¶àÌõ¼Ç¼¶ÔÓ¦µÄÈý¸ö×ֶΣ¬µ«Êǽá¹ûÈ´ÊDZ»Ð޸ĵıíÈý¸ö×ֶζàÌõ¼Ç¼Öж¼ÊÇһģһÑùµÄ¡£´æ´¢¹ý³Ì±àÒëûÓÐÎÊÌ⣬ÓαêÈ´ÔÚÔËÐÐʱδÓÐÒÆÏòÏÂÌõ¼Ç¼£¬ÎªÊ²Ã´ÄØ£¿³ÌÐòÈçÏ£º
create or replace procedure cust_update is
cursor v_cur is
select cust_id,cust_st_child_group_id,cust_st_group_id
from o_user_cons where cust_id not in
(select cust_id from o_user_cons group by cust_id having count(cust_id)>=2);
v_rownum number;
v_cust_id varchar(20);
v_cust_st_child_group_id number;
v_cust_st_group_id number;
begin
v_rownum:=1;
open v_cur;
loop
fetch v_cur into v_cust_id,v_cust_st_child_group_id,v_cust_st_group_id;
v_cust_st_group_id:=v_cust_st_group_id/100;
if v_rownum<=300
then update cust
set cust_id=v_cust_id,stratagem_child_group_id=v_cust_st_child_group_id,
stratagem_group_id=v_cust_st_group_id;
commit;
v_rownum:=v_rownum+1;
else exit;
end if;
end loop;
close v_cur;
end cust_update;
updateÓï¾äûÓÐÖ¸¶¨ÐУ¿ÄÇv_rownumÓÐʲôÓÃ
SQL code:
--Õâ¸öÓï¾äµÄÌõ¼þÄØ£¬Èç¹ûûÓÐÌõ¼þ£¬
--±ícustËùÓмÇÂ
Ïà¹ØÎÊ´ð£º
ÎÒÊÇÓÃÔ¶³Ì×ÀÃæÁ¬²Ù×÷·þÎñÆ÷ÉϵÄÊý¾Ý¿â¡£
ÔÚ´´½¨Ò»¸öÓû§Ö®ºó£¬ÔÙÓÃPLSQLµÇ¼£¬ÔòPLSQLËÀµôÁË¡£
ÎҹصôPLSQLÖ®ºó£¬ÓÃÆäËûÓû§Ò²²»ÄܵǼ¡£
ÎÒ°ÑoracleµÄ·þÎñÍ£Ö¹£¬½á¹û¾ÍÊÇoracleµÄ·þÎñ״̬¾ÍÍ£ÁôÔÚ¡°Í ......
¸÷λoracle¸ßÊÖ£¬Çë½ÌÒ»ÏÂΪʲôoracle 10gÔÚ°²×°µ½°Ù·ÖÖ®°ËÊ®ÎåµÄʱºò¾Í±¨´í²»ÄܼÌÐø°²×°£¿
ÄÚ´æ¶à´ó£¿¡¡ÖØÐÂϸöÊý¾Ý¿â°²×°ÊÔÊÔ..
ÒýÓÃ
¸÷λoracle¸ßÊÖ£¬Çë½ÌÒ»ÏÂΪʲôoracle 10gÔÚ°²×°µ½°Ù·ÖÖ®°ËÊ®ÎåµÄʱ ......
private static final String URL = "jdbc:oracle:thin:@localhost:1521:orcl";
private static final String USERNAME = "sys";
private static final String PASSWORD = "s ......
ÔÚÖ´ÐаüµÄʱºòÒýÓÃoracle spatial¿Õ¼äº¯Êý³ö´í£¬³ö´íÇé¿öÈçÏÂ
Errors in file
/user/oracle/app/oracle/admin/grid/udump/grid1_ora_143768.trc: ORA-29902:
error in executing ODCIIndexStart() routine ORA-0 ......
Á½¸ö±í
Çë¿´ "Persons" ±í£º
name banji shunxu
yiyang 01 1
yiyang 02 1
lili 01 2
½ÓÏÂÀ´Çë¿´ "xueke" ±í£º
name kemu shunxu
yiy ......