¹ØÓÚSQLÓï¾äORµÄÎÊÌâ - Oracle / ¸ß¼¶¼¼Êõ
ͨ¹ýNAME×Ö¶ÎÌõ¼þ²éѯһ¸öÊý¾Ý±í£¬¼ÙÉèÎÒÓÐ100¸öÐÕÃû£¬ÓÐÒÔÏÂÁ½¸ö·½·¨£¬ ·½·¨1£º °Ñ100¸öName ×é³ÉÒ»¸öSQLÓï¾ä£¬±ÈÈç Select * from tmp_table where Name='ÕÅÈý' or Name ='ÀîËÄ' Or ...Or Name='µÚÒ»°Ù¸öÐÕÃû' ·½·¨2£º ͨ¹ýÑ»·100´Î£¬Ã¿´ÎÖ´ÐÐÒ»¸öNameÌõ¼þ£¬Ö´ÐÐ100¸öSQLÓï¾ä Select * from tmp_table where Name='ÕÅÈý' Select * from tmp_table where Name='ÀîËÄ' ...... Select * from tmp_table where Name='µÚÒ»°Ù¸öÐÕÃû' ÕâÁ½ÖÖ·½·¨ÄǸöËٶȸü¿ìһЩ£¿
select * from tmp_table where name in(Ò»°Ù¸öÃû×Ö) ˵ʵÔÚ£¬Á½ÖÖ¶¼²»ºÃ¡£ Èç¹ûÖ»ÓÃsql´¦Àí£¬1Â¥·½·¨ºÃ£»Èç¹ûÓÃpl/sql´¦Àí£¬¿ÉÒÔÓÃÄãµÄ·½·¨2£¬µ«ÒªÊ¹Óð󶨱äÁ¿ Select * from tmp_table where Name=:v_name;ÒýÓà ͨ¹ýNAME×Ö¶ÎÌõ¼þ²éѯһ¸öÊý¾Ý±í£¬¼ÙÉèÎÒÓÐ100¸öÐÕÃû£¬ÓÐÒÔÏÂÁ½¸ö·½·¨£¬ ·½·¨1£º °Ñ100¸öName ×é³ÉÒ»¸öSQLÓï¾ä£¬±ÈÈç Select * from tmp_table where Name='ÕÅÈý' or Name ='ÀîËÄ' Or ...Or Name='µÚÒ»°Ù¸öÐÕÃû' ·½·¨2£º ͨ¹ýÑ»·100´Î£¬Ã¿´ÎÖ´ÐÐÒ»¸öNameÌõ¼þ£¬Ö´ÐÐ100¸öSQLÓï¾ä Select * fr¡¡ ÕâЩ·½·¨¶¼²»ÊǺܺà µÚÒ»Öֺà µÚÒ»ÖÖÖ»¶Ô±íɨÃèÒ»´Î µÚ¶þÖÖÖ»¶Ô±íɨÃè100´Î to:Phoenix_99 select * from tmp_table where name in(Ò»°Ù¸öÃû×Ö) ÎҼǵúÃÏñIN ÔÚSQLÓï¾äÀï²»ÊÇ×îÂýµÄ¡£²»ÖªµÀÊDz»ÊÇ ÎÒ¾ÍÊÇÓÃDELPHI±àд¿Í»§¶Ë³ÌÐò£¬ÐèÒªÌáÈ¡Õâ¸ö100¸öÐÕÃûµÄÊý¾Ý£¬´ó¼ÒÓöµ½ÕâÑùµÄÎÊÌⶼ²Éȡʲô·½·¨ÄØ£¿ Ò²ÓпÉÄÜ200,300£¬»ò¸ü¶à£¬Æä
Ïà¹ØÎÊ´ð£º
Ö´ÐеÄ˳Ðò£º 1£©Îļþä¯ÀÀ¿ò£¨Ñ¡ÔñÎļþʹÓã© Ñ¡ÔñºÃÎļþºó µã»÷Ò»¸öµ¼Èë°´Å¥µÄʱºò £¬°ÑÉÏÃæÉÏ´«¿òÀïµÄcsvÎļþÒÔÒ»¸öIDΪÎļþÃû£¬ÉÏ´«µ½**/**Îļþ¼ÐÏ 2£©¶ÁÈ¡Õâ¸öÎļþ¼ÐϵÄcsvµÄÎļþ£¬×ª»»³Ésql 3 ......
¿ÉÄÜÒòΪ¹¤×÷µÄÔÒò ½Ó´¥Êý¾Ý¿âÕâ¿é±È½ÏÉÙ£¬Ö®Ç°¶¼ÊÇ×ö³ÌÐòÕâ¿é£¬Êý¾Ý¿âÕâ¿é¶¼ÓÐרÃŵÄÈËÀ´×ö ·Ö¹¤¶¼ºÜÃ÷ϸ ËùÒÔ¶ÔÊý¾Ý¿âÕâÒ»¿éÍêÈ«²»Á˽⡣ǰ¶Îʱ¼ä È¥ÃæÊÔÁ˼¸¼Ò¹«Ë¾ ¼¸ºõ¶¼ÊÇÔÚÊý¾Ý¿âÕâ¿é¹ÒµôµÄ Á¬¸ö¼òµ¥µÄSQ ......
×öÍædata guard ºó ÔÚPrimary·þÎñÆ÷ Ö´ÐÐ SQL>SELECT SEQUENCE#,APPLIED from V$ARCHIVED_LOG ORDER BY SEQUENCE#; SEQUENCE# APP ---------- --- 13 NO 13 YES ......
ÕâÀïÏëÁ˽âÏ£¬¹ØÓÚSQL ServerÖзÖÒ³ºÍOracleÖзÖÒ³£» ƽ³£Ð´Ó¦ÓóÌÐòµÄʱºò£¬±ÈÈçÓõÄÓïÑÔÊÇJava£¬ÓиöÁбíÒ³Ã棬ÐèÒª¶ÔÊý¾Ý·ÖÒ³ÏÔʾ£» ÕâÀïÒª·ÖÒ³ÄѵÀ²»ÐèÒª½èÖúJava£¬¶øÖ±½ÓsqlÄÜÖªµÀ·ÖÒ³Âð£¬ÆðÂëÒ²Òª´«¸öÒ³Âë½ ......