oracleÐòÁвÙ×÷
-- ÐòÁвÙ×÷ --
-- ´´½¨ÐòÁÐ
CREATE SEQUENCE u_sales_SEQ INCREMENT BY 1 START WITH 1 MINVALUE 1 NOCYCLE NOCACHE NOORDER;
-- ²é³öËùÓдæÔÚµÄÐòÁÐ
SELECT * from user_sequences
-- ɾ³ýÐòÁÐ
DROP SEQUENCE U_SALES_SEQ;
-- ²é³öÏÂÒ»¸öÐòÁÐID
SELECT U_SALES_SEQ.nextval from DUAL
-- ²é³öµ±Ç°ÐòÁеÄID
SELECT U_SALES_SEQ.currval from DUAL;
¡¡¡¡2¡¢Alter Sequence
¡¡¡¡Äã»òÕßÊǸÃsequenceµÄowner£¬»òÕßÓÐALTER ANY SEQUENCE ȨÏÞ²ÅÄܸĶ¯sequence. ¿ÉÒÔalter³ýstartÖÁÒÔÍâµÄËùÓÐ
sequence²ÎÊý.Èç¹ûÏëÒª¸Ä±ästartÖµ£¬±ØÐë drop sequence ÔÙ re-create .
¡¡¡¡Alter sequence µÄÀý×Ó
¡¡¡¡ALTER SEQUENCE emp_sequence
¡¡¡¡INCREMENT BY 10
¡¡¡¡MAXVALUE 10000
¡¡¡¡CYCLE -- µ½10000ºó´ÓÍ·¿ªÊ¼
¡¡¡¡NOCACHE ;
¡¡¡¡Ó°ÏìSequenceµÄ³õʼ»¯²ÎÊý£º
¡¡¡¡SEQUENCE_CACHE_ENTRIES =ÉèÖÃÄÜͬʱ±»cacheµÄsequenceÊýÄ¿¡£
¡¡¡¡¿ÉÒԺܼòµ¥µÄDrop Sequence
¡¡¡¡DROP SEQUENCE order_seq;
¡¡--½¨´¥·¢Æ÷
¡¡¡¡CREATE OR REPLACE TRIGGER table1_tg
¡¡¡¡BEFORE INSERT ON table1
¡¡¡¡FOR EACH ROW
¡¡¡¡BEGIN
¡¡¡¡SELECT table1_seq.NEXTVAL INTO :NEW.id from DUAL;
¡¡¡¡END;
Ïà¹ØÎĵµ£º
¼Ç¼һÏÂORACLE 10gR2µÄÈí¼þÏÂÔصØÖ·£¬±¸Óá£
ÏÂÔØOTNÉϵÄÕâЩÈí¼þ£¬ÄãÐèÒªÒ»¸öOTNÃâ·ÑÕʺţ¬²»¹ýÈç¹ûͨ¹ýѸÀ×½øÐÐÏÂÔØ£¬¾Í²»ÓõǽOTNÁË£º
Oracle Database 10g Release 2 (10.2.0.1.0) Enterprise/Standard Edition for Microsoft Windows (32-bit)
http://download.oracle.com/otn/nt/oracle10g/10201/10201_database ......
How to land your dream Oracle DBA job
By Don Burleson, Contributor
14 Jan 2010
If you look at the Help Wanted ads, some Oracle DBA jobs look very appealing, with salaries that rival those of engineers and other professionals. Some have starting salaries as high as $85,000, with senior Orac ......
Author: rainnyzhong
Date:2010-1-15
1£® Ö¢×´ÃèÊö£º
FALB12´ÓEXCEL IMPORT DATAµ½DB£¬Ô¤¼ÆÊÂÎñ»áÔËÐÐ1¸ö¶àСʱ£¬ÔÚ¿ªÊ¼²Ù×÷ºó40·ÖÖÓ×óÓÒ£¬ORACLE¹ÒËÀ£¬ÈκÎÓû§¶¼²»¿ÉÒÔÔٵǽÁË¡£
2£® ·ÖÎö
£¨1£© ÏÂÃæÊǹÒËÀʱOSµÄ×ÊÔ´×´¿ö£º
09:37:54 up 73 ......
Óû§ºÅÂë µÇ½ʱ¼ä
1300000000 2010-01-01
1300000001 2010-01-01
1300000002 2010-01-02
1300000001 2010-01-02
1300000003 2010-01-03
1300000002 2010-01-03
1300000004 2010-01-04
1300000003 2010-01-04
1300000004 2010-01-02
1300000006 2011-01-04
1300000001 2011-01-04
ÌÞ³ýÖظ´µ ......