oracle Ò»´Îɾ³ý¶àÕűíµÄÊý¾Ý£¨Î´²âÊ԰棩
spool d:\deletetb.sql;
select 'delete ' || table_name || ' where to_char(col,'||'''yyyy'''||')='||'''2007'''||';'
from user_tables
where table_name in (select 'HS_' || lpad(rownum, '2', '0')
from dual
connect by rownum < 100);
spool off;
==================================================================================
--ÀàËÆÈçÏÂ
PHP code:
begin
for x in (select * from user_objects where object_name like 'HS_%') loop
execute immediate 'delete from '||x.object_name||' where substr(apl_date,0,4)=''2007''';
end loop;
end;
where object_name like 'HS_%' => where object_name like 'HS\_%' escape '\'
Ïà¹ØÎĵµ£º
Óα꣺
ÓÃÀ´²éѯÊý¾Ý¿â£¬»ñÈ¡¼Ç¼¼¯ºÏ£¨½á¹û¼¯£©µÄÖ¸Õ룬¿ÉÒÔÈÿª·¢ÕßÒ»´Î·ÃÎÊÒ»Ðнá¹û¼¯£¬ÔÚÿÌõ½á¹û¼¯ÉÏ×÷²Ù×÷¡£
·ÖÀࣺ
¾²Ì¬Óα꣺
·ÖΪÏÔʽÓαêºÍÒþʽÓαꡣ
REFÓα꣺
ÊÇÒ»ÖÖÒýÓÃÀàÐÍ£¬ÀàËÆÓÚÖ¸Õë¡£
ÏÔʽÓα꣺
CURSOR ÓαêÃû ( ²ÎÊý ) [·µ»ØÖµÀàÐÍ] IS
Select Óï¾ä
ÉúÃüÖÜÆÚ£º
1.´ò¿ªÓαê(OP ......
ÓÃJavaÀ´²Ù×÷Êý¾Ý¿â£¬ÓÐÈçϼ¸ÖÖ·½Ê½£º
1JDBC-ODBCÇÅ£ºODBCÊý¾ÝÔ´ÔÚ²Ù×÷ϵͳ²ãÃæ¸øÓèÁËÖ§³Ö£¬ÎÒÃÇ¿ÉÒÔ²»ÓÃÁ˽âµ×²ãµ½µ×ÊÇ·â×°µÄÄÄÖÖÊý¾ÝÔ´£¬Ò²ÕÕÑù¿ÉÒÔÍê³É¶ÔÊý¾ÝµÄ²Ù×÷¡£µ«ÊÇËüÓÐƽ̨ÒÀÀµÐÔ£¬²»Ì«ÍƼöʹÓá£
2Javaµ½±¾µØAPI
3Javaµ½ÍøÂçÐÒé
4Javaµ½Êý¾Ý¿âÐÒ飺ËÙ¶È×î¿ì
Á¬½ÓÊý¾Ý¿â¿ÉÒÔ·ÖΪËIJ½£º
A¼ÓÔØÇý¶¯³ÌÐò£¨Ï ......
±¾ÎÄÀ´×Ôhttp://www.cnblogs.com/rootq/articles/1177562.html
Oracle Êý¾Ý¿âµÄ°ó¶¨±äÁ¿ÌØÐÔ¼°Ó¦ÓÃ
¹Ø¼ü´Ê:
°ó¶¨±äÁ¿(binding variable),¹²Ïí³Ø(shared buffer pool), SGA(system global area);
ÔÚ¿ª·¢Ò»¸öÊý¾Ý¿âϵͳǰ,ÓÐ˶ÔOracle ϵͳÁ˽âºÜ¶à,ÓÈÆäÊÇËüµÄÌØÐÔ,ºÃÏóºÜÉÙ°É;¶Ô³õѧÕßÀ´½²,Õâ¸üÊDz»¿ÉÄܵÄÊÂÇé;½ö½ö¼òµ ......
1.½¨±í
CREATE TABLE qq(
qq_num integer
);
2.²åÈëÊý¾Ý
²åÈëÊý¾ÝµÄ·½·¨ÓкܶàÖÖ£¬µ«ÊÇÒª²åÈë3ÒÚÊý¾Ý£¬±ØÐëÒªÓиßЧµÄËã·¨¡£ÔÚ²åÈëÊý¾ÝʱÎÒÓÃÁË×µÄ°ì·¨£¬²ÉÓÃPL/SQLÀûÓÃÁ÷³Ì¿ØÖƵÄLOOPÓï¾ä²åÈ롣ͬʱÎÒÒ²¿´ÁËÍøÉϵIJåÈëЧÂʵÄÓÅ»¯£¬ÔõÑùÀûÓýÏÉÙµÄʱ¼äÉú³É½Ï¶àµÄ²âÊÔÊý¾Ý¡£¸ø ......