Oracle³£ÓÃÓï¾ä
--ÈçºÎÓÃgrade±íµÄ×ÊÁÏÈ¥¸üÐÂusertable±íµÄ×ÊÁÏ£¨ÓйØÁªµÄ×Ö¶Îuserid£©
update usertable u set u.grade =
(select g.grade from grade g where g.userid = u.userid);
--ÈçºÎʹ²éѯ½á¹û×Ö¶ÎÉú³ÉÐòºÅ
select rownum, t.* from sm_t_pad_new t
--ÈçºÎ¿ìËÙ×öÒ»¸öºÍÔ±íÒ»ÑùµÄ±¸·Ý±í
create table new_table as (select * from user);
--ÈçºÎ²é¿´Êý¾ÝÎļþµÄ´æ·Å·¾¶
select tablespace_name, file_id, bytes/1024/1024, file_name
from dba_data_files order by file_id;
--²éѯÐÕÃûÏàͬµÄÔ±¹¤µÄÐÅÏ¢
select u1.userid, u1.username from user u1,
(select username, count(*) from user group by username having count(username) > 1) u2
where u1.username = u2.username;
--¸ù¾Ýʱ¼ä²éѯ
select * from user
where create_time >= to_date('2010-4-16 00:00:00','YYYY-MM-DD HH24:mi:ss')
and create_time <= to_date('2010-4-16 12:00:00','YYYY-MM-DD HH24:mi:ss')
Ïà¹ØÎĵµ£º
Ç°Á½Ì죬ÔÚ¿Í»§µÄÐéÄâ»úÉÏ°²×°oracleÈí¼þÓÃÓÚ²¿Êð×Ô¼ºµÄÓ¦ÓᣲÅ×°ºÃ²»¾Ã£¬ÓÉÓÚÐèÒªÅäÖÃÍøÂ簲ȫ£¬°ÑÕû¸öÐéÄâ»ú¶¼²ùµô£¬¿Ë¡Á˸öÅäÖúÃÍøÂ簲ȫµÄÐéÄâ»ú¸øÎÒÃÇʹÓã¬Ö»µÃÖØ×°oracle 10g¡£
µ±µÚ¶þ´ÎÔÚÐéÄâ»úÉÏ°²×°oracleʱ£¬Êý¾Ý¿âÃûºÍϵͳÕ˺ŵÄÃÜÂ붼×öÁ˸Ķ¯£¬½á¹ûÖ±½Óµ¼ÖÂÔÚ´´½¨oracleʵÀýʱµ¯³öora-12154´íÎó¡£Ñ¡Ôñ¡¾º ......
¶ÔÓÚUNDO
±í¿Õ¼ä´óСµÄ¶¨ÒåÐèÒª¿¼ÂÇUNDO_RETNETION
²ÎÊý¡¢²úÉúµÄUNDO BLOCKS/
Ãë¡¢UNDO BLOCK
µÄ´óС¡£undo_retention
£º¶ÔÓÚUNDO
±í¿Õ¼äµÄÊý¾ÝÎļþÊôÐÔΪautoextensible,
Ôòundo_retenion
²ÎÊý±ØÐëÉèÖã¬UNDO
ÐÅÏ¢½«ÖÁÉÙ±£ÁôÖÁundo_retention
²ÎÊýÉ趨µÄÖµÄÚ£¬µ«UNDO
±í¿Õ¼ä½«»á×Ô¶¯À©Õ¹¡£¶ÔÓڹ̶¨UNDO
±í¿Õ¼ä ......
Ê×ÏȲ鿴Êý¾Ý¿âÏÖÓÐģʽ¿ÉʹÓÃÒÔÏÂÓï¾ä
select name,log_mode from v$database;
Ò²¿ÉÒÔÓÃÏÂÃæµÄÓï¾ä
archive log list£»(¸Ã·½·¨ÐèÒªas sysdba)
¶ÔÓڷǹ鵵ģʽµÄÊý¾Ý¿â¸ÃΪ¹éµµÄ£Ê½£¨Ö÷ÒªÒÔOracle 10gΪ²Î¿¼£©Ê¹ÓÃÒÔϲ½Ö裺
1. SQL> alter system set log_archive_dest_1='location=/oracle/oracle10g/log/archive ......
±¾ÎĵµÊÇOracle
Database 11.2.0.1 for RHEL5 Server(°üÀ¨x86ºÍx86_64ƽ̨)µÄ¾²Ä¬°²×°Ö¸ÄÏ. ËùÓвÙ×÷ÎÞÐèʹÓÃͼÐνçÃæ. ¾²Ä¬°²×°ÄܼõÉÙ°²×°³ö´íµÄ¿ÉÄÜÐÔ, Ò²ÄÜ´ó´ó¼Ó¿ì°²×°ËÙ¶È.
# ºó¸úÃüÁî±íʾÒÔ²Ù×÷ϵͳÏÂrootÓû§²Ù×÷; ºó¸úÃüÁî±íʾÒÔ²Ù×÷ϵͳÏÂoracleÓû§²Ù×÷;
1.1 ÉÏ´«Èí¼þ
¼ÙÈç·ÅÔÚ/wangnc/oracle/11g/Ä ......
Êýѧº¯Êý
¡¡¡¡1.¾ø¶ÔÖµ
¡¡¡¡S:select abs(-1) value
¡¡¡¡O:select abs(-1) value from dual
¡¡¡¡2.È¡Õû(´ó)
¡¡¡¡S:select ceiling(-1.001) value
¡¡¡¡O:select ceil(-1.001) value from dual
¡¡¡¡3.È¡Õû£¨Ð¡£©
¡¡¡¡S:select floor(-1.001) value
¡¡¡¡O:select floor(-1.001) value from dual
¡¡¡¡4.È¡Õ ......