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

oracleÖеĵ¥ÒýºÅºÍË«ÒýºÅ

ÔÚOracleÖУº
¡¡¡¡Ë«ÒýºÅµÄ×÷ÓÃÊÇ£ºÈç¹û´´½¨¶ÔÏóµÄʱºò£¬¶ÔÏóÃû¡¢×Ö¶ÎÃû¼ÓË«ÒýºÅ£¬Ôò±íʾOracle½«ÑϸñÇø·Ö´óСд£¬·ñÔòOracl¶¼Ä¬ÈÏ´óд¡£
¡¡¡¡¶øµ¥ÒýºÅÔò±íʾ£ºÕâ¸ö¼ÓÁ˵¥ÒýºÅµÄ×Ö¶ÎÊÇÒ»¸ö×ÖÀàËÆ×Ö·û´®£¬²¢²»Çø·Ö´óСд¡£
¡¡¡¡µ¥ÒýºÅÓÃÓÚ±êʶ×Ö·ûÓëÊý×ÖµÄÇø±ð
¡¡¡¡µ±Ö¸¶¨×Ö·û´®Îı¾Ê±£¬±ØÐëÓõ¥ÒýºÅ½«×Ö·û´®Îı¾Òýס¡£
¡¡¡¡Oracle10g֮ǰ£¬Èç¹û×Ö·û´®Îı¾ÀﺬÓе¥ÒýºÅ£¬ÄÇô±ØÐëʹÓÃÁ½¸öµ¥ÒýºÅ±íʾ¡£ÀýÈ磺I'm a String!
¡¡¡¡×Ö·û´®Îı¾ÔòΪ£ºstring_var:='I''m a String!'
¡¡¡¡ÔÚoracle10gÖпÉÒÔʹÓÃÆäËü·Ö¸ô·û£¨<>,[],{}µÈ£©,×¢Ò⣬ʹÓÃÕâЩ·Ö¸ô·ûʱ£¬²»½öÒªÔÚ·Ö¸ô·ûÇ°ºó¼Óµ¥ÒýºÅ£¬»¹Òª´øÓÐǰ׺q.Àý£ºstring_var:=q'[I''m a String!]';
¡¡¡¡ÀýÈç
¡¡¡¡select * from table_name where id=1;ÕâÖÖ´ú±í²éѯµÄÊÇÊý×Ö
¡¡¡¡select * from table_name where id='1';ÕâÖÖ´ú±í²éѯµÄÊÇ×Ö·û
¡¡¡¡Èç¹ûÊÇË«ÒýºÅÊÇÕâÑù£¬¼ÙÈçÄãÓиö±íµÄ×ֶνÐsysdate£¬ÒòΪsysdateÊôÓÚoracleÖеÄÌØÓÐ×Ö·û£¬µ«ÄãÒª²éѯÕâ¸ö×ֶεÄʱºò
¡¡¡¡select "sysdate" from table_name;
¡¡¡¡µ«ÊÇÄãÒªÊÇÓÃ
¡¡¡¡select 'sysdate' from table_name;
¡¡¡¡ÄÇôÄã²é³öÀ´µÄ¾ÍÊÇ×Ö·û´®£¬½á¹ûÊÇsysdate
¡¡¡¡Ê¹ÓÃÈçϵĸüÐÂÓï¾ä²»ÐУºupdate device set dept='select * from message where name='tom' ' ;
¡¡¡¡½â¾ö·½·¨£º
¡¡¡¡update device set dept='select * from message where name=' 'tom' '  where  id=3' ;
¡¡¡¡Ö´Ðгɹ¦¡£
¡¡¡¡Ô­À´£¬Á½¸ö'' ±íʾÁËÒ»¸ö'
ÁíÍ⣺
ÔÚsqlÖпÉÓÃ+½øÐÐ×Ö·û´®Á¬½Ó.
ÔÚoracleÖÐÊÇÓÃ||½øÐÐ×Ö·û´®Á¬½Ó


Ïà¹ØÎĵµ£º

jdbcÁ¬½ÓOracle

      ËäȻѧϰJavaºÜ¾ÃÁË£¬×Ô¼ºÒ²Á¬½Ó¹ýһЩÊý¾Ý¿â£¬±ÈÈçmysqlÖ®ÀàµÄ£¬Èç½ñÄØ£¬Ò²Ñ§Ï°ÁËÒ»¶Îʱ¼äµÄOracle£¬È»¶øÄØ£¬½ñÌìÊÇÎÒµÚÒ»´ÎÁ¬½ÓOracle£¬ºÙºÙ£¬Ó¦¸Ã»¹²»ËãÌ«³Ù°É¡£
    ½ñÌìÄØ£¬Óе㱿׾£¬´ó¼ÒĪЦ£¡
    ÎÒÕâÊÇÒ»¸ö²éѯÀý×Ó
    Ê×ÏÈ£¬Ô ......

oracle¸´Ï°£¨Ò»£© Ö®OracleÌåϵ½á¹¹

      ѧϰOracle DBAÒ²°ë¸ö¶àѧÆÚÁË£¬½ñÌìÃÍÈ»²Å·¢ÏÖ£¬Ô­À´ÎÒµÄÊ黹ÊǺÜеģ¬ÉϿβÙ×÷ʱºòÒ²Ö»ÊÇÖªµÀ´ó¸ÅÔõô×ö£¬µ«ÊÇÒªÕæµÄÈ«²¿×Ô¼º×ö£¬¶ø²»È¥·­Ê黹ÊÇÓÐÒ»¶¨µÄÄѶȵģ¬ËùÒÔÄØ£¬½ñÌ쿪ʼ½«DBA´ÓÍ·¸´Ï°Ò»±é£¬Í¬Ê±ÔÙ²Ù×÷Ò»±é¡£
      µÚÒ»Õ£¬Ñ§µÄÊÇOracleµÄÌåϵ½á¹¹£ ......

oracle¿Í»§¶ËÁ¬½Ó ORA 06413 Á¬½Óδ´ò¿ª´íÎó

½ñÌìÔÚһ̨2003serverÉÏ°²×° 9i¿Í»§¶Ë¡£
ÅäÖÃÁËtnsÖ®ºóÁ¬½Ó£¬±¨´í "ORA-06413 Á¬½Óδ´ò¿ª´íÎó".
°ÑÆäËü·þÎñÆ÷µÄtnsname.oraÖ±½Ó¿½±´¹ýÀ´Ò²²»ÐС£
ºóÀ´²éÁËÒ»ÏÂ×ÊÁÏ£¬ËµÓ¦ÓóÌÐò·¾¶Àï±ßÓÐÌØÊâ×Ö·û¡£
Õâ²Å»ÐÈ»´óÎò£¬Á½ÄêÇ°Õâ¸öÎÊÌâÒѾ­ÕÛÄ¥¹ýÎÒÒ»´ÎÁË£¬ÄÔ×Ó²»ºÃ£¬¾¹È»¸øÍüÁË¡£
Ô­Òò¾ÍÊÇ64λϵͳ»·¾³Ï°²×°oracle£¬oralc ......

oracle±Ê¼Ç

--oralceÖдӱíÖÐËæ»úÈ¡³önÌõ¼Ç¼
select * from  (select t.*,dbms_random.random num from fms_branch_info t order by num)    
where rownum <= 5;
--È¡Ç°Ê®ÐÐ
SELECT t.* from fms_branch_info t
WHERE ROWNUM != 10
--WHERE ROWNUM between 1 and 10
ORDER BY branch_code;
......

OracleÓαêʵÓÃ

  declare
sqlstring varchar2(100);
emprow emp_bak%rowtype;
myno emp_bak.empno%type;
begin

--sqlstring:='create table emp_bak as select * from emp';

sqlstring:='select * from emp_bak where empno=:myno and sal>:mysal';

myno:='&ÇëÊäÈëÔ±¹¤±àºÅ';

--¶¯Ì¬SQ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ