OracleÖÐÐòÁÐsequence Ó÷¨
1£© ½¨Á¢ÐòÁÐÃüÁî
CREATE SEQUENCE [user.]sequence_name
[increment by n]
[start with n]
[maxvalue n | nomaxvalue]
[minvalue n | nominvalue];
INCREMENT BY£º Ö¸¶¨ÐòÁкÅÖ®¼äµÄ¼ä¸ô£¬¸ÃÖµ¿ÉΪÕýµÄ»ò¸ºµÄÕûÊý£¬µ«²»¿ÉΪ0¡£ÐòÁÐΪÉýÐò¡£ºöÂÔ¸Ã×Ó¾äʱ£¬È±Ê¡ÖµÎª1¡£
START WITH£ºÖ¸¶¨Éú³ÉµÄµÚÒ»¸öÐòÁкš£ÔÚÉýÐòʱ£¬ÐòÁпɴӱÈ×îСֵ´óµÄÖµ¿ªÊ¼£¬È±Ê¡ÖµÎªÐòÁеÄ×îСֵ¡£¶ÔÓÚ½µÐò£¬ÐòÁпÉÓɱÈ×î´óֵСµÄÖµ¿ªÊ¼£¬È±Ê¡ÖµÎªÐòÁеÄ×î´óÖµ¡£
MAXVALUE£ºÖ¸¶¨ÐòÁпÉÉú³ÉµÄ×î´óÖµ¡£
NOMAXVALUE£ºÎªÉýÐòÖ¸¶¨×î´óֵΪ1027£¬Îª½µÐòÖ¸¶¨×î´óֵΪ-1¡£
MINVALUE£ºÖ¸¶¨ÐòÁеÄ×îСֵ¡£
NOMINVALUE£ºÎªÉýÐòÖ¸¶¨×îСֵΪ1¡£Îª½µÐòÖ¸¶¨×îСֵΪ-1026¡£
2£© ¸ü¸ÄÐòÁÐÃüÁî
ALTERSEQUENCE [user.]sequence_name
[INCREMENT BY n]
[MAXVALUE n| NOMAXVALUE ]
[MINVALUE n | NOMINVALUE]£»
ÐÞ¸ÄÐòÁпÉÒÔ£º
? ÐÞ¸ÄδÀ´ÐòÁÐÖµµÄÔöÁ¿¡£
? ÉèÖûò³·Ïû×îСֵ»ò×î´óÖµ¡£
? ¸Ä±ä»º³åÐòÁеÄÊýÄ¿¡£
? Ö¸¶¨ÐòÁкÅÊÇ·ñÊÇÓÐÐò¡£
3£© ɾ³ýÐòÁÐÃüÁî
DROP SEQUENCE [user.]sequence_name£»
´ÓÊý¾Ý¿âÖÐɾ³ýÒ»ÐòÁС£
´´½¨Ò»¸öÐòÁкŵÄÓï¾ä£º
CREATE SEQUENCE EXAM_NO_SEQ
START WITH 1484
MAXVALUE 9999999999
MINVALUE 1
CYCLE
CACHE 20
NOORDER;
PBÖÐÈ¡ÐòÁкŵÄÓ÷¨£º
string v_exam_no
//»ñÈ¡ÉêÇëÐòºÅ
SELECT exam_no_seq.nextval INTO :v_exam_no from dual
using ghis_database;
if ghis_database.SQLCODE<>0 then
messagebox("","È¡¼ì²éÐòºÅ³ö´í")
return
end if
================================================================================
ÆäËû°æ±¾
oracleÖÐûÓÐ×ÔÔöÀàÐ͵Ä×ֶεģ¬ËùÒÔͨ³£Çé¿öÏÂÐèÒª¶¨ÒåÒ»¸
Ïà¹ØÎĵµ£º
http://www.oracle.com/technology/global/cn/obe/2day_dba/index.html
¿Î³ÌÁбí
1
¹ÜÀíÊý¾Ý¿âµÄÒªËØÊÇʲô£¨Ã»Óб¾Õ¶ÔÓ¦µÄ¸½¼Ó×ÊÁÏ£©
2
°²×° Oracle ºÍ¹¹½¨Êý¾Ý¿â
3
Oracle Enterprise Manager Êý¾Ý¿â¿ØÖÆÈëÃÅ
4
ÅäÖÃÍøÂç»·¾³
5
¹ÜÀí Oracle Àý³Ì
6
¹ÜÀíÊý¾Ý¿â´æ´¢½á¹¹
7
¹ÜÀíÓû§ºÍ°²È«ÐÔ
8
¹ÜÀíģʽ¶ ......
µÚÒ»´ÎÔÚLinuxÉÏ°²×°OracleµÄʱºòÅöµ½Õâ¸öÎÊÌ⣬ºÇºÇ¡£Ö®Ç°ÔÚLinuxÉÏ°²×°Oracleʱ£¬Ò»°ã¶¼Ê¹ÓÃRedHatϵÁеÄLinux£¬ÔÚ°²×°¹ý³ÌÖУ¬ÐèÒª×ö´óÁ¿µÄ°²×°Ç°Öù¤×÷£¬Èç°²×°RPM°ü£¬´´½¨×éºÍÓû§£¬ÐÞ¸ÄÄں˲ÎÊý£¬Ð޸Ļ·¾³±äÁ¿µÈ¡£Õâ´ÎʹÓõÄÊÇRedFlagµÄAsianux 3£¬¶øÇÒ×Ô´øOracleµÄ°²×°¸¨Öú¹¤¾ßOrana ......
linuxÏÂoracleµÄ×Ô¶¯±¸·Ý
http://hohai2002.blog.163.com/blog/static/1628166912010323103227543/
±¸·Ý
ÉÏ´«root_cronµ½rootĿ¼
ʹÓÃcrontab ÅäÖÃÎļþ
crontab -u root /root/root_cron
ʹÓÃcrontab -l ¼ì²é
#Îļþ root_cron
01 00 * * * /etc/root_exp.sh
#Îļþroot_exp.sh
su - oracle -c /oracle/db ......
ϵͳȨÏÞ£º »ØÊÕʱ²»»á²úÉú¼¶Áª»ØÊÕ
conn / as sysdba;
create user t1 identified by t1;
create user t2 identified by t2;
grant connect to t1,t2;
grant create table, create view to t1 with admin option;
conn t1/t1
grant create table to t2;
conn / as sysdba;
select * from dba_sys_privs where gra ......
1¡¢×Ö·û¼¯µÄһЩ»ù±¾ÖªÊ¶
×Ö·û¼¯ÓкܶàÖÖ£¬×î³õµÄ×Ö·û¼¯ÊÇASCII£¬ÓÉÓÚASCIIÖ§³ÖµÄ×Ö·ûºÜÓÐÏÞ£¬Òò´ËËæºóÓÖ³öÏÖÁ˺ܶàµÄ±àÂë·½°¸£¬ÕâЩ±àÂë·½°¸´ó²¿·Ö¶¼ÊÇ°üÀ¨ÁËASCIIµÄ¡£EBCDIC±àÂëÊÇÁíÒ»¸ö±È½Ï»ù±¾µÄ±àÂ룬ËüµÄ²¿·Ö×Ö·û²ÉÓÃÁ˺ÍASCII²»Í¬µÄ±àÂëÖµ£¬Òò´ËÁ½ÕßÊDz»¼æÈݵĻù±¾±àÂë·½°¸¡£²ÉÓÃEBCDIC±àÂëµÄ±È ......