½â³ýoracleÊý¾Ý¿âÖÐËùÓÐÍâ¼üÔ¼ÊøSQLÓï¾ä
begin
for item in (select * from user_constraints a where a.constraint_type = 'R') loop
execute immediate 'alter table ' || item.table_name || ' disable constraint ' || item.constraint_name;
end loop;
end;
/
Ïà¹ØÎĵµ£º
PL/SQL-FOR UPDATE Óë FOR UPDATE OFµÄÇø±ð
url:http://hi.baidu.com/1413/blog/item/a521251f7e5993c4a686696b.html
Êý¾Ý¿â oracle for update of ºÍ for updateÇø±ð
select * from TTable1 for update Ëø¶¨±íµÄËùÓÐÐУ¬Ö»ÄܶÁ²»ÄÜд
2 select * from TTable1 wher ......
SQL Server Êý¾Ý¿âµÄÕûÀíÓÅ»¯µÄ»ù±¾¹ý³Ì£¨Ò»£©
¸ß½¨¸Õ
×÷ΪϵͳµÄÖØÒªÒ»¸ö²¿·Ö£¬Êý¾Ý¿âµÄÐÔÄÜÔÚϵͳµÄÔËÐйý³ÌÖÐÆðµ½Á˷dz£¹Ø¼üµÄ×÷Óã¬ÏµÍ³µÄÔËÐйý³ÌÖУ¬ÎÒÃǾ³£Óöµ½¿Í»§±§Ô¹ÏµÍ³ÔËÐеÄÌ«Âý£¬Í³¼ÆÒ»¸öÔµı¨±í¾³£»á³öÏÖ³¬Ê±µÄÇé¿ö£¬Ãæ¶ÔÕâЩÎÊÌ⣬ÎÒÃÇÓ¦¸ÃÈçºÎ´¦ÀíÄÄ£¿³ÌÐòÓÅ»¯ºÍÊý¾Ý¿âÓÅ»¯ÒªÍ¬²½½øÐУ¬³ÌÐò·½ÃæÓ ......
ÎÒÃÇͨ³£ÔÚ¶¨Î»Êý¾Ý¿âËøÎÊÌâʱ£¬Í¨³£Ï£ÍûÕÒµ½Äĸö½ø³Ì·¢³öÁËÄĸöÓï¾ä£¬Ëø×¡ÁËÄÄÕÅ±í£¬Ò»°ãÎÒÃÇͨ¹ý²év$lock£¬È»ºóÕÒµ½sid,ÔÙµ½v$sesionÀïÕÒµ½Õâ¸ö½ø³ÌµÄhash_value»òpre_hash_value,È»ºó¸ù¾Ýhash_value¶¨Î»µ½¾ßÌåµÄÓï¾ä¡£
¿ÉÊÇ£¬ÎÒÃÇ·¢ÏÖ£¬Í¨¹ýJDBCÁ¬½ÓÉÏÀ´µÄ½ø³Ì£¬ËüµÄhash_valueÊÇ0,ËùÒÔÎÒÃǾÍÎÞ·¨¶¨Î»Õâ¸ö½ø³ÌÖ´ÐеÄÓï¾ ......
½ñÌì²âÊÔwebÏîĿн¨ÁËÒ»¸öÊý¾Ý¿â£¬½á¹û±¨´í,ÒÔǰµÇ¼ֱ½ÓÑ¡Ôñ'WindowsÉí·ÝÑéÖ¤',²¢Ã»ÓÐʲôÎÊÌâ³öÏÖ!¿Éǰ¶Îʱ¼ä²ÉÓÃ'SQLSERVERÉí·ÝÑéÖ¤'È¥µÇ¼,ËæÖ®µÄÎÊÌâ¾ÍÀ´ÁË.ÎÞÂÛÓÃʲô·½·¨¾ÍÊÇÒ»¸ö½á¹û³ö´í! ³ö´íµÄÔÒòÊÇ:'Óû§ 'sa' µÇ¼ʧ°Ü¡£¸ÃÓû§Óë¿ÉÐÅ SQL Server Á¬½ÓÎÞ¹ØÁª'.½ñÌìÉÏÍøÉϲéÁ˰ëÌ컹ÊǸ㲻¶¨,×îºó¾¹ýÍøÉϺÍÊéÉ ......