Oracle×ÔÔöIDµÄ½â¾ö°ì·¨
Ê×ÏÈ´´½¨Ò»¸öË÷Òý£¬È»ºó´´½¨Ò»¸ö´¥·¢Æ÷
Ë÷ÒýµÄÃû×Ö£º SEQ_tproduct
´¥·¢Æ÷µÄÃû×Ö£º addid
±íÃû£ºtproduct
×ÔÔöÁÐÃû£ºpid
create sequence SEQ_tproduct
minvalue 1
start with 1
increment by 1
nocache;
create or replace trigger addid
before insert on tproduct
for each row 51Testing
begin
select SEQ_tproduct.nextval into :new.pid from dual;
end;
Ïà¹ØÎĵµ£º
ODP.NET 11gÊÇOracle¹«²¼µÄ¹©.NET³ÌÐò·ÃÎÊOracleÊý¾Ý¿âµÄADO.NET×é¼þ£¬±È΢Èí×Ô´øµÄOracle×é¼þÐÔÄܺ㬸ü¿ÉÒÔ·ÃÎÊUDT(User Defined Type)²¿À࣬Procedure£¬REFÖ®Àà¸ß¼¶OracleÌØÕ÷¡£
¡¡¡¡.NET 1.1µÄ¿Í»§¶Ë¼±ÐèµÄ¹«²¼×ÊÁÏÈç´Î£º
¡¡¡¡¡ôOracle.DataAccess.dll (odt111odp.netinÒ».x)
¡¡¡¡¡ôOraOps11.dll £¨odt111in£© ......
drop table test;
select count(*) from test;
--´´½¨²âÊÔ±í
create table test
(
id number(9),
nick varchar2(30)
);
--²åÈë²âÊÔÊý¾Ý
begin
for i in 1..100000 loop
insert into test(id) values(i);
end loop;
commit;
end;
select * ......
Ëæ׿ÆËã»úµÄÆÕ¼°ÒÔ¼°ÍøÂçµÄ·¢Õ¹£¬Êý¾Ý¿âÒѾ²»ÔÙ½ö½öÊÇÄÇЩ³ÌÐòÔ±ËùרÓеĻ°Ìâ¡£¶øOracleÊý¾Ý¿â¸üÊÇƾ½èÆäÐÔÄÜ׿Խ£¬²Ù×÷·½±ãÁé»îµÄÌص㣬ÔÚÊý¾Ý¿âµÄÊг¡ÖÐÒѾռ¾ÝÁËһϯ֮µØ¡£µ«ÊÇͬÑùËæ×ÅÍøÂç¼¼ÊõµÄ²»¶Ï½ø²½£¬Êý¾ÝÐÅÏ¢µÄ²»¶ÏÔö¼Ó£¬Êý¾Ý°²È«ÒѾ²»ÔÙÊÇÒÔÇ°µÄ“ÀÏÉú³¤Ì¸”£¬Ò²¸ü²»ÊÇÒÔÇ°Êé±¾ÉÏÄÇЩ“¿ÉÍû² ......
1¡¢¶¨ÒåÒ»¸ö°ó¶¨±äÁ¿
VAR[IABLE] [variable [NUMBER|CHAR|CHAR (n)|NCHAR|NCHAR (n) |VARCHAR2 (n)|NVARCHAR2 (n)|CLOB|NCLOB|REFCURSOR]]
¶¨ÒåÒ»¸ö°ó¶¨±äÁ¿£¬¸Ã±äÁ¿¿ÉÒÔÔÚpl/sqlÖÐÒýÓá£
¿ÉÒÔÓÃprintÃüÁîÏÔʾ¸Ã°ó¶¨±äÁ¿µÄÐÅÏ¢¡£
2¡¢oracle ÖУ¬¶ÔÓÚÒ»¸öÌá½»µÄsqlÓï¾ä,´æÔÚÁ½ÖÖ¿ÉÑ¡µÄ½âÎö¹ý³Ì, Ò»ÖÖ½Ð×öÓ²½âÎö,Ò»ÖÖ½Ð×ö ......
ÕâÁ½ÌìÔÚwindows7ÉÏ°²×°OracleÅöµ½Á˵ãÎÊÌâ,Ê×ÏÈÄÃOracle 10g32λµÄ°²×°°üÈ¥×°£¬½á¹ûÒ»Çж¼Õý³££¬PL/SQLÁ¬½Ó·þÎñÆ÷Êý¾Ý¿âÕý³££¬
µ«ÊÇÖ´ÐÐÎҵijÌÐòʱ×ÜÊDZ¨ÎÞ·¨½âÎöÁ¬½Ó±êʶ·û¡£¡£ºóÀ´ÓÐͬÊÂ˵¿ÉÄÜÊÇwindows7 ÊÇ64λµÄϵͳµÄÔÒò¡£½ÓמÍÏÂÔØÁË64λµÄOracle
10g °æ±¾µÄ¡£¡£µ«ÔÚ°²×°Ê±£¬Ìáʾϵͳ²Ù×÷°æ±¾¹ý¸ß£ºÖ»Ö§³Ö4.1£¬ ......