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

OracleÖеÄһЩʱ¼ä´¦Àí


<!--
/* Font Definitions */
@font-face
{font-family:ËÎÌå;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimSun;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:"\@ËÎÌå";
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
mso-pagination:none;
font-size:10.5pt;
mso-bidi-font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:ËÎÌå;
mso-font-kerning:1.0pt;}
/* Page Definitions */
@page
{mso-page-border-surround-header:no;
mso-page-border-surround-footer:no;}
@page Section1
{size:595.3pt 841.9pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;
mso-header-margin:42.55pt;
mso-footer-margin:49.6pt;
mso-paper-source:0;
layout-grid:15.6pt;}
div.Section1
{page:Section1;}
/* List Definitions */
@list l0
{mso-list-id:1401251922;
mso-list-type:hybrid;
mso-list-template-ids:850396746 -692523360 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
{mso-level-tab-stop:18.0pt;
mso-level-number-position:left;
margin-left:18.0pt;
text-indent:-18.0pt;}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
-->
Oracle
ÖеÄʱ¼ä´¦Àí
1.      
µ±Ç°Ê±¼ä£º
select sysdate from dual
¡£
2.      
µ±ÆÚʱ¼ä¼õÈ¥Ò»ÌìºóµÄʱ¼ä£º
select sysdate from dual
¡£
3.      
µ±ÆÚʱ¼ä¼õȥһСʱºóµÄʱ¼ä£º
select sysdate - 0.041666687 from dual
¡£
4.      
µÃµ½µ±Ç°Äê·Ý£º
select to_char(sysdate, ‘YYYY’) from dual;
5.  


Ïà¹ØÎĵµ£º

Oracle±í¿Õ¼ä¹ÜÀí

extent--×îС¿Õ¼ä·ÖÅ䵥λ --tablespace management
block --×îСi/oµ¥Î»      --segment    management
create tablespace james
datafile '/export/home/oracle/oradata/james.dbf'
size 100M ¡¡¡¡¡¡¡¡¡¡¡¡--³õʼµÄÎļþ´óС¡¡
autoextend On¡¡¡¡¡¡¡¡ --×Ô¶¯Ôö³¤
next 10M¡ ......

oracleÊý¾Ý¿âʱ³£ÓõIJÙ×÷ÃüÁîÕûÀí

µÇ¼oracleÊý¾Ý¿âʱ³£ÓõIJÙ×÷ÃüÁîÕûÀí
1¡¢su – oracle ²»ÊDZØÐ裬ÊʺÏÓÚûÓÐDBAÃÜÂëʱʹÓ㬿ÉÒÔ²»ÓÃÃÜÂëÀ´½øÈësqlplus½çÃæ¡£
2¡¢sqlplus /nolog »òsqlplus system/manager »ò./sqlplus system/manager@ora9i
;
3¡¢SQL>connect / as sysdba ;£¨as sysoper£©»ò
connect internal/oracle AS SYSDBA ;(scott/ti ......

oracleÖÐÖ´Ðд洢¹ý³Ì

´´½¨ÁËÒ»oracleµÄ¶¨Ê±ÈÎÎñ£¬¶¨Ê±µÄ½«Ò»¸ö±íÖеļǼ²åÈëµ½ÁíÒ»¸ö±íÖУ¬²éѯµÄʱºò±íÖо¹È»Ã»Êý¾Ý£¬ÔÚpl/sqlÖв鿴½¨µÄÈÎÎñ·¢ÏÖfailuresµÄֵΪ3£¬ÄѵÀ½¨µÄ´æ´¢¹ý³ÌÓÐ´í£¿ÔËÐÐһϴ洢¹ý³ÌÊÔÊÔ°É£¬²éÊý¾Ý¿âÊ飬ִÐд洢¹ý³ÌÃüÁîÊÇ£ºcall procedure ¹ý³ÌÃû£»
Ö´ÐÐÒ»ÏÂÃüÁ²»¶Ô£¿ÔÙ´ÓÍøÉϲé°É£¬Ò»²é£¬oracleÖÐÖ´Ðд洢¹ý³ÌµÄ ......

Oracle µÄrownum Ô­ÀíºÍʹÓà ¼°ÓërowidµÄÇø±ð

Oracle µÄrownum Ô­ÀíºÍʹÓÃ
ÔÚOracle ÖУ¬Òª°´Ìض¨Ìõ¼þ²éѯǰNÌõ¼Ç¼£¬Óøörownum ¾Í¸ã¶¨ÁË¡£
select * from emp where rownum <= 5
¶øÇÒÊéÉÏÒ²¸æ½ë£¬²»ÄܶÔrownum ÓÃ">"£¬ÕâÒ²¾ÍÒâζ×Å£¬Èç¹ûÄãÏëÓÃ
select * from emp where rownum > 5
ÔòÊÇʧ°ÜµÄ¡£ÒªÖªµÀΪʲô»áʧ°Ü£¬ÔòÐèÒªÁ˽ârownum ±³ºóµÄ»úÖÆ£ ......

oracleͬʱÏò¶à±í²åÈëÊý¾Ý

µ¥±í²åÈëÒÔinsert into¿ªÍ·,²»ÄÜÓÐthen intoÓï¾ä.
¶à±í²åÈëÒÔinsert first/all ¿ªÍ·,¿ÉÒÔÓÐthen intoÓï¾ä
ÔÚOracle²Ù×÷¹ý³ÌÖо­³£»áÓöµ½Í¬Ê±Ïò¶à¸ö²»Í¬µÄ±í²åÈëÊý¾Ý£¬´ËʱÓøÃÓï¾ä¾Í·Ç³£ºÏÊÊ¡£
All±íʾ·Ç¶Ì·ÔËË㣬¼´Âú×ãÁ˵ÚÒ»¸öÌõ¼þÒ²µÃÏòÏÂÖ´Ðв鿴ÊÇ·ñÂú×ãÆäËüÌõ¼þ£¬¶øFirstÊǶÌ·ÔËËãÕÒµ½ºÏÊÊÌõ¼þ¾Í²»ÏòϽøÐС£
I ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ