Oracleɾ³ý±íÖÐÖظ´¼Ç¼
--刪³ýÖØ復ÁÐ
a.Èç¹ûÓÐID×ֶΣ¬¾ÍÊǾßÓÐΨһÐÔµÄ×Ö¶Î
delect table where id not in (
select max(id) from table group by col1,col2,col3...
)
group by ×Ó¾äºó¸úµÄ×ֶξÍÊÇÄãÓõ½ÅÐ斷Öظ´µÄ×Ö¶Î
b.,Èç¹ûÊÇÅÐ斷ËùÓÐ×Ö¶Î
select * into #aa from table group by id1,id2,....
delete table table
insert into table
select * from #aa
c.Èç¹û±íÖÐÓÐIDµÄÇé況
select identity(int,1,1) as id,* into #temp from tabel
delect # where id not in (
select max(id) from # group by col1,col2,col3...)
delect table
inset into table(...)
select ..... from #temp
col1+','+col2+','...col5 組ºÏÖ÷鍵
select * from table where col1+','+col2+','...col5 in (
select max(col1+','+col2+','...col5) from table
where having count(*)>1
group by col1,col2,col3,col4
)
group by ×Ó¾äºó¸úµÄ×ֶξÍÊÇÄãÓõ½ÅÐ斷Öظ´µÄ×Ö¶Î
d.
Ïà¹ØÎĵµ£º
create or replace directory MY_DIR as '/usr/test/';
create or replace function f_exportTxt(
--´«Èë²ÎÊý
i_query in varchar2,
i_separator in varchar2,
i_dir in varchar2,
i_filename in varchar2
) return number
is
/**
** º¯ÊýÃû:f_exportTxt
&nbs ......
ת×Ô£ºhttp://hong9270503.blog.163.com/blog/static/1272923200916112245844/
ѧϰoracle,×îºÃÊ×ÏÈÁ˽âOracleµÄ¿ò¼Ü¡£ÕâÑù¶ÔOracleÓÐÒ»¸öÕûÌåµÄÈÏʶ£¬ÓиßÎݽ¨ê²µÄ×÷Óá£
1¡¢ÎïÀí½á¹¹£¨ÓÉ
¿ØÖÆÎļþ¡¢Êý¾ÝÎļþ¡¢ÖØ×öÈÕÖ¾Îļþ¡¢²ÎÊýÎļþ¡¢¹éµµÎļþ¡¢¿ÚÁîÎļþ×é³É£©
¡¡¡¡
Ò»¸öÊý¾Ý¿âÖеÄÊý¾Ý´æ´¢ÔÚ´ÅÅÌÉÏÎïÀíÎļþ£¬ ......
Oracle UndoµÄѧϰ
»Ø¹ö¶Î
¿É
ÒÔ˵ÊÇÓÃÀ´±£³ÖÊý¾Ý±ä»¯Ç°Ó³Ïó¶øÌṩһÖ¶ÁºÍ±£ÕÏÊÂÎñÍêÕûÐÔµÄÒ»¶Î´ÅÅÌ´æ´¢ÇøÓò¡£µ±Ò»¸öÊÂÎñ¿ªÊ¼µÄʱºò£¬»áÊ×ÏȰѱ仯ǰµÄÊý¾ÝºÍ±ä»¯ºóµÄÊý¾ÝÏÈдÈëÈÕÖ¾»º
³åÇø£¬È»ºó°Ñ±ä»¯Ç°µÄÊý¾ÝдÈë»Ø¹ö¶Î£¬×îºó²ÅÔÚÊý¾Ý»º³åÇøÖÐÐ޸ģ¨ÈÕÖ¾»º³åÇøÄÚÈÝÔÚÂú×ãÒ»¶¨µÄÌõ¼þºó¿ÉÄܱ»Ð´Èë´ÅÅÌ£¬µ«ÔÚÊ ......
Ç°Á½Ì죬ÔÚ¿Í»§µÄÐéÄâ»úÉÏ°²×°oracleÈí¼þÓÃÓÚ²¿Êð×Ô¼ºµÄÓ¦ÓᣲÅ×°ºÃ²»¾Ã£¬ÓÉÓÚÐèÒªÅäÖÃÍøÂ簲ȫ£¬°ÑÕû¸öÐéÄâ»ú¶¼²ùµô£¬¿Ë¡Á˸öÅäÖúÃÍøÂ簲ȫµÄÐéÄâ»ú¸øÎÒÃÇʹÓã¬Ö»µÃÖØ×°oracle 10g¡£
µ±µÚ¶þ´ÎÔÚÐéÄâ»úÉÏ°²×°oracleʱ£¬Êý¾Ý¿âÃûºÍϵͳÕ˺ŵÄÃÜÂ붼×öÁ˸Ķ¯£¬½á¹ûÖ±½Óµ¼ÖÂÔÚ´´½¨oracleʵÀýʱµ¯³öora-12154´íÎó¡£Ñ¡Ôñ¡¾º ......