oracle id ×ÔÔö
oracleÈÃid×Ô¶¯Ôö³¤£¨insertʱ²»ÓÃÊÖ¶¯²åÈëid£©µÄ°ì·¨£¬ÏñMysqlÖеÄauto_incrementÄÇÑù
´´½¨ÐòÁÐ
create sequence emp_seq
increment by 1
start with 1
nomaxvalue
nocycle
cache 10
DAOÒýÓÃÐòÁÐ
insert into emp
values(emp_seq.nextval,'aaa')
ÐÞ¸ÄÐòÁУ¨²»ÄÜÐÞ¸ÄÆôʼֵ£©
alter sequence emp_seq
increment by 10
maxvalue 10000
Ïà¹ØÎĵµ£º
Mysql£¬SqlServer£¬OracleÖ÷¼ü×Ô¶¯Ôö³¤µÄÉèÖÃ
1¡¢°ÑÖ÷¼ü¶¨ÒåΪ×Ô¶¯Ôö³¤±êʶ·ûÀàÐÍ
ÔÚmysqlÖУ¬Èç¹û°Ñ±íµÄÖ÷¼üÉèΪauto_incrementÀàÐÍ£¬Êý¾Ý¿â¾Í»á×Ô¶¯ÎªÖ÷¼ü¸³Öµ¡£ÀýÈ磺
create table customers(id int auto_increment primary key not null, name varchar(15));
insert into customers(name) values("name1"),("nam ......
À俽±¸ÁËÒ»¸öÔÓÐÊý¾Ý¿â£¬Òª°ÑËûÒÆÖ²µ½ÐµÄÊý¾Ý¿âÖÐʱ£¬Òª×¢Òâһϣº
1.Oradim -new -sid [ʵÀýÃû:demo] -intpwd [PWD] -pfile= [Òª´´½¨ÊµÀýµÄÅäÖÃÎļþ£º*.ora]
2.set Oracle_SID=[ʵÀýÃû]£¨×°Íêºó¼ÇµÃÒªÔÚ×¢²á±íÀï¼ÓÉÏ:HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_OraDb10g_home1£ºORACLE_SID£¬ÖµÎªÊµÀýÃû¡££©
3.sql ......
£±¡¢È·¶¨ÄãµÄ¼ÆËã»úÉÏ×°ÓÐoracleµÄ¿Í»§¶Ë£¬Èç¹ûûÓУ¬Çë°²×°oracle¿Í»§¶Ë
£²¡¢È·¶¨ÓÐÄãµÄoracle·þÎñÀïÓÐÄãÒªÐèÒª±¸·ÝµÄÊý¾Ý¿âµÄ·þÎñÃû¡£
£³¡¢ÖÆ×÷Ò»¸öÅú´¦ÀíÎļþ£¨oracleBackup.bat£©£¬¾ßÌå·½·¨£º´ò¿ª“¼Çʱ¾”£¬±£´æΪoracleBackup.bat£¬
¡¡¡¡´Ëʱ±£´æµÄÎļþÀàÐÍÑ¡ÔñΪ“ËùÓÐÎļþ”¡£Îҵı£´æÄ¿Â ......
×÷Ϊһ¸öORACLE DBA,ÔÚ¹¤×÷Öлᾳ£´¦ÀíÓÉÓÚ×Ö·û¼¯²úÉúµÄһЩÎÊÌâ¡£µ«Êǵ±ÕæÕýÏëдһЩÕâ·½ÃæµÄ¶«Î÷ʱ£¬È´Í»È»ÓÖûÓÐÁËÍ·Ð÷¡£·¢ÁË°ëÌì´ô£¬»¹ÊǾö¶¨ÓÃÁ½¸ö×Ö·û¼¯·½ÃæµÄÀý×Ó×÷ΪÇÐÈëµã£¬µ¹²»Ê§ÎªÒ»¸öÍ·Ð÷£¬Ëµ²»¶¨ÔÚʵÑéµÄ¹ý³ÌÖУ¬ÎÊÌâ¾Í»áÒ»¸ö½Ó×ÅÒ»¸öµÄ¸¡ÏÖ³öÀ´¡£
ÏÖÔÚ£¬ÈÃÎÒÃÇÇÐÈëÕýÌâ¡£
ÎÒÓõÄÊý¾Ý¿âÊÇoracle10.2.0.3,Êý ......
Êý¾Ý¿â²éѯÖÐÄÑÃâ»áÓöµ½ÐÐÁÐת»»µÄÇé¿ö£¬ÕªÁÐһЩ½Ï¾«µäµÄ½â¾ö·½°¸
--####################################################################
Ò»¡¢²ÉÓÃSQL decodeºÍPL/SQLº¯ÊýʵÏÖ
--####################################################################
1¡¢¹Ì¶¨ÁÐÊýµÄÐÐÁÐת»»
Èç
student subject grade
------ ......