Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ʹÓÃOracleµÄDBMS_SQL°üÖ´Ðж¯Ì¬SQLÓï¾ä

 ÔÚijЩ³¡ºÏÏ£¬´æ´¢¹ý³Ì»ò´¥·¢Æ÷ÀïµÄSQLÓï¾äÐèÒª¶¯Ì¬Éú³É¡£OracleµÄDBMS_SQL°ü¿ÉÒÔÓÃÀ´Ö´Ðж¯Ì¬SQLÓï¾ä¡£±¾ÎÄͨ¹ýÒ»¸ö¼òµ¥µÄÀý×ÓÀ´Õ¹Ê¾ÈçºÎÀûÓÃDBMS_SQL°üÖ´Ðж¯Ì¬SQLÓï¾ä£º
DECLARE
       v_cursor NUMBER;
       v_stat NUMBER;
       v_row NUMBER;
       v_id NUMBER;
       v_no VARCHAR(100);
       v_date DATE;
       v_sql VARCHAR(200);
       s_id NUMBER;
       s_date DATE;
BEGIN
     s_id := 3000;
     s_date := SYSDATE;
     v_sql := 'SELECT id,qan_no,sample_date from "tblno" WHERE id > :sid and sample_date < :sdate';
     v_cursor := dbms_sql.open_cursor; --´ò¿ªÓαꣻ
     dbms_sql.parse(v_cursor, v_sql, dbms_sql.native); --½âÎö¶¯Ì¬SQLÓï¾ä£»
     dbms_sql.bind_variable(v_cursor, ':sid', s_id); --°ó¶¨ÊäÈë²ÎÊý£»
     dbms_sql.bind_variable(v_cursor, ':sdate', s_date);
    
     dbms_sql.define_column(v_cursor, 1, v_id); --¶¨ÒåÁÐ
     dbms_sql.define_column(v_cursor, 2, v_no, 100);
     dbms_sql.define_column(v_cursor, 3, v_date);
     v_stat := dbms_sql.execute(v_cursor); --Ö´Ðж¯Ì¬SQLÓï¾ä¡£
     LOOP
         EXIT WHEN dbms_sql.fetch_rows(v_cursor)<=0; --fetch_rowsÔÚ½á¹û¼¯ÖÐÒƶ¯Óα꣬Èç¹ûδµÖ´ïĩ⣬·µ»Ø1¡£        
         dbms_sql.column_value(v_cursor, 1, v_id); --½«µ±Ç°ÐеIJéѯ½á¹ûдÈëÉÏÃ涨ÒåµÄÁÐÖС£
         dbms_sq


Ïà¹ØÎĵµ£º

oracle ±í¿Õ¼ä²Ù×÷

oracle±í¿Õ¼ä²Ù×÷Ïê½â
  1
  2
  3×÷Õߣº   À´Ô´£º    ¸üÐÂÈÕÆÚ£º2006-01-04 
  5
  6 
  7½¨Á¢±í¿Õ¼ä
  8
  9CREATE TABLESPACE data01
 10DATAFILE '/ora ......

ORACLE ÕýÔò±í´ïʽ

¾ÍÊÇÓÉÆÕͨ×Ö·û£¨ÀýÈç×Ö·ûaµ½z£©ÒÔ¼°ÌØÊâ×Ö·û£¨³ÆΪԪ×Ö·û£©×é³ÉµÄÎÄ×Öģʽ¡£¸ÃģʽÃèÊöÔÚ²éÕÒÎÄ×ÖÖ÷Ìåʱ´ýÆ¥ÅäµÄÒ»¸ö»ò¶à¸ö×Ö·û´®¡£ÕýÔò±í´ïʽ×÷Ϊһ¸öÄ£°å£¬½«Ä³¸ö×Ö·ûģʽÓëËùËÑË÷µÄ×Ö·û´®½øÐÐÆ¥Åä¡£
±¾ÎÄÏêϸµØÁгöÁËÄÜÔÚÕýÔò±í´ïʽÖÐʹÓã¬ÒÔÆ¥ÅäÎı¾µÄ¸÷ÖÖ×Ö·û¡£µ±ÄãÐèÒª½âÊÍÒ»¸öÏÖÓеÄÕýÔò±í´ïʽʱ£¬¿ÉÒÔ×÷Ϊһ¸ö¿ ......

ORACLE OMF½éÉÜ

ÏÈ¿´Oracle ¹Ù·½½âÊÍ
Oracle managed file (OMF)
A file that is created automatically by the Oracle database server when it is needed and automatically deleted when it is no longer needed.
 
ÈçºÎÅжÏÄãµÄÊý¾Ý¿âÊÇ·ñΪ֧³ÖOMF
SQL> show parameter db_create_file_dest;
 
NAME  & ......

SQL ×óÍâÁ¬½Ó£¬ÓÒÍâÁ¬½Ó£¬È«Á¬½Ó£¬ÄÚÁ¬½Ó

 Áª½ÓÌõ¼þ¿ÉÔÚ   from   »ò   WHERE   ×Ó¾äÖÐÖ¸¶¨£¬½¨ÒéÔÚ   from   ×Ó¾äÖÐÖ¸¶¨Áª½ÓÌõ¼þ¡£WHERE   ºÍ   HAVING   ×Ó¾äÒ²¿ÉÒÔ°üº¬ËÑË÷Ìõ¼þ£¬ÒÔ½øÒ»²½É¸Ñ¡Áª½ÓÌõ¼þËùÑ¡µÄÐС£   
   
Áª½Ó¿É·ÖΪÒÔϼ¸Àࣺ      ......

Ô¶³Ì±¸·ÝSQL Server 2005Êý¾Ý¿â

 ½ñÌìÖÕÓÚ°ÑÕâ¸öÎÊÌâ¸ø½â¾öÁË£º
²Î¿¼ÎÄÕ£ºhttp://blog.csdn.net/long2006sky/archive/2007/04/23/1576583.aspx
ʵÀý˵Ã÷£º
           »·¾³£ºwin2k+sqlserver 2K+²éѯ·ÖÎöÆ÷
           SQLSERVER·þÎñʵÀý ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ