OracleÎÂÏ°ÓëÈëÃÅ
SQL Server¿ª·¢ÕßOracle¿ìËÙÈëÃÅ http://kb.cnblogs.com/a/853694 ¼òµ¥¸ÅÄîµÄ½éÉÜ 1. Á¬½ÓÊý¾Ý¿â
S: use mydatabase
O: connect username/password@DBAlias
conn username/password@DBAlias 2. ÔÚOracleÖÐʹÓÃDual, DualÊÇOracleÒ»¸öÌØÓеÄÐéÄâ±í, OracleÖкܶàϵͳµÄ±äÁ¿ºÍº¯Êý¶¼¿ÉÒÔͨ¹ýDualÖлñµÃ
S: select getdate();
O: select sysdate from dual; 3. Select IntoºÍInsert Óï¾äµÄʹÓÃ, ÔÚSQL ServerÖеÄSelect IntoÓï¾äÔÚOracleÖÐÒ»°ãÊÇInsert into¡select¡, ÁíÍâ2¸öÊý¾Ý¿â¶¼Ö§³Ö±ê×¼µÄSQL, д·¨ÉÏÂÔÓÐÇø±ð
S: select getdate() mycolumn into mytable;
Insert mytable values(¡®more text¡¯);
O: insert into mytable select getdate() mycolumn from dual
insert into mytable (mycolumn) values(sysdate); 4. UpdateÓï¾ä
S: update mytable set mycolumn=myothertable.mycolumn
from mytable,myothertable
where mytable.mycolumn like 'MY%' and myothertable.myothercolumn='some text';
O: update mytable set mycolumn=
(select a.mycolumn from myothertable a
where myothertable.myothercolumn='some text')
where mytable.mycolumn like 'MY%'; 5. DeleteÓï¾ä
S: delete mytable where mycolumn like 'some%';
O: delete from mytable where mycolumn like 'some%'; 6. ʹÓÿª·¢¹ÜÀíµÄÈí¼þ
S: isql
osql: for queries developed in SQL Analyzer
SQL Server Management Studio Express ͼÐλ¯¹ÜÀí¹¤¾ß
O: sqlplus
PL/SQL Developer ͼÐλ¯¿ª·¢¹ÜÀí¹¤¾ß
TOAD ͼÐλ¯¿ª·¢¹ÜÀí¹¤¾ß
×¢: ¸öÈ˽¨Òé»ù±¾µÄ¼òµ¥µÄSelect
Ïà¹ØÎĵµ£º
http://www.javaeye.com/topic/366991#
×÷Ϊһ¸ö¿ª·¢ÈËÔ±£¬¿ªÊ¼ÈÏÕæϵͳѧϰ
Oracle SQLÒ²Ö»ÓÐÔÂÓ֮࣬ǰµÄ
SQLÖª
ʶ½ö½öÊÇÏîÄ¿ÀïÃæÓõ½Ê²Ã´¾ÍÈ¥¿´Ê²Ã´£¬¼òµ¥Ëµ¾ÍÊÇ
Read The Fxxking Guide¡£ÔÚϵͳѧϰ
Oracle
SQL֮ǰ£¬°³µÄÏë·¨¾ÍÊÇ“°´ÕÕÐèÇóÍê³É¹¦ÄÜ£¬Ê£ÏµĽ»¸ø
DBAÀ´´¦À픡£Õâ¸öÏë·¨´ÓÕûÌåÀ´¿´ÏÔ ......
¡¡Ëæ×ÅÏÖ´úÊý¾Ý¿â¿ÉÓÃÌØÕ÷¼¯µÄѸËÙÔö¼Ó£¬ºÜÄÑÇø·ÖÊëºÃÊ뻵¡£ÀýÈçOracleÀï¾ÍÓÐÐí¶àÄã¿ÉÄÜ´ÓÀ´¶¼²»ÐèÒªµÄ¸ß¼¶Êý¾Ý²Ö¿âÌØÕ÷¡£´ËÍâÒ²¿ÉÄÜÓÐһЩÆäËü²»¿É»òȱµÄÌØÕ÷±ÈÈçACIDÊÂÎñÌØÐÔ¡£ÎÒÃÇÀ´¿´Ò»¿´Ö÷ÒªµÄһЩÌØÕ÷£¬±ÈÈç´æ´¢¹ý³Ì£¬ÊÓͼ£¬¿ìÕÕ£¬±íÊý¾ÝÀàÐͺÍÊÂÎñµÈµÈ¡£Í¬Ê±ÎÒÃÇ·ÖÎöÒ»ÏÂPostgresql£¬MySQLºÍOracleÕ⼸¸öÊý¾Ý¿â£¬È»º ......
--´´½¨±í¿Õ¼ä
create tablespace Ãû³Æ
(
datafile='·¾¶\Ãû³Æ.ora',
size='50M',
autoextend='on'
)
/
--´´½¨ÁÙʱ±í¿Õ¼ä
create temporary tablespace Ãû³Æ
(
tempfile='·¾¶\Ãû³Æ.ora',
size='50M',
autoextend='on'
)
/
--´´½¨Óû§
create user Óû§Ãû idtenified by ÃÜÂë
/
--ΪÓû§Ö¸¶¨ ......
а²×°ÁËһ̨Êý¾Ý¿â·þÎñÆ÷£¬°æ±¾ÊÇ10.2.0.1µÄ£¬ÒòΪÏÖÔÚ×îеÄÊÇ10.2.0.4µÄ¡£ °æ±¾µÍÁË£¬bug¶à¡£ËùÒԾͶÔÊý¾Ý¿â×öÁËÒ»¸öÉý¼¶¡£
·þÎñÆ÷ÊÇwindows 2003µÄϵͳ£¬¶¼ÊÇ¿ÉÊÓ»°²Ù×÷¡£ ÏÂÒ»²½µÄÎÊÌâ¡£ 10.2.0.4µÄpatchset ÀïÃæÒ²ÓÐÏêϸµÄ°²×°ËµÃ÷¡£ Ö®×ö¸ö×ܽá ......