oracleÓësqlserver²åÈëÊý¾Ý¶¯Ì¬×Ö¶ÎÖµ
¼Ç¼һÏÂÒÔ±¸Ï´οìËÙÕÒµ½¡£¡£¡£
Íùtb_wf_privgrant±íÖвåÈëÒ»Ìõ¼Ç¼£¬workflow_id×Ö¶ÎÖµ´Ótb_wf_workflow ±íÖлñÈ¡workflow_name='֪ʶÉóºË'µÄËùÓмǼÖÐworkflow_id×î´óÖµ¡£
--oracle
declare a NUMBER(10);
begin
select max(workflow_id) into a from tb_wf_workflow where workflow_name='֪ʶÉóºË';
insert into tb_wf_privgrant(grant_Id,workflow_id,member_id,member_type,knowledge_code) values (HIBERNATE_SEQUENCE.NEXTVAL, a,'r001','R','6001');
end;
--sqlserver
--·½·¨Ò»
insert into tb_wf_privgrant(workflow_id,member_id,member_type,knowledge_code)
select max(workflow_id),'r001','R','6001' from tb_wf_workflow where workflow_name='֪ʶÉóºË'
--·½·¨¶þ
declare @a numeric(10,0)
select @a = max(workflow_id) from tb_wf_workflow where workflow_name='֪ʶÉóºË'
insert into tb_wf_privgrant(workflow_id,member_id,member_type,knowledge_code)
values (@a,'r001','R','6001')
Ïà¹ØÎĵµ£º
ʲôÊǺϲ¢¶àÐÐ×Ö·û´®£¨Á¬½Ó×Ö·û´®£©ÄØ£¬ÀýÈ磺
SQL> desc test;
Name Type Nullable Default Comments
------- ------------ -------- ------- --------
COUNTRY VARCHAR2(20) Y &nb ......
ת×Ô£ºhttp://ilonng.blog.sohu.com/130335741.html
oracleµÄnumberÀàÐÍÊÇÒ»ÖÖÈí¼þÊý¾ÝÀàÐÍ£¬ÔÚoracleÈí¼þ±¾ÉíÖÐʵÏÖ£¬ÎÒÃDz»ÄÜʹÓùÌÓÐÓ²¼þ²Ù×÷½«Á½¸önumberÀàÐÍÏà¼Ó£¬ÕâÒªÔÚÈí¼þÖÐÄ£Ä⣬number ÀàÐ͵ÄÄÚ²¿±àÂëÊÇ2¡£oracle´æ´¢Ò»¸öÊýµÄʱ£¬»á´æ´¢¾¡¿ÉÄÜÉÙµÄÄÚÈÝÀ´±íʾÕâ¸öÊý£¬Îª´ËËü»á´æ´¢ÓÐЧÊý×Ö¡¢ÓÃÓÚÖ¸¶ ......
1.´´½¨±í£º
a. ´´½¨xs±íÖмÆËã»úרҵѧÉúµÄ±¸·Ý
Create table xs_jsj as select * from xs where zym=’¼ÆËã»ú’;
b.ÍêÕûµÄÀý×Ó£º
¡¡¡¡¡¡¡¡¡¡ Create table test ......
---------------------------------------------------------------------------
---- ±¾ÎÄΪandkylee¸öÈËÔ´´£¬ÇëÔÚ×ðÖØ×÷ÕßÀͶ¯³É¹ûµÄǰÌáϽøÐÐ×ªÔØ£»
---- ×ªÔØÎñ±Ø×¢Ã÷Ôʼ³ö´¦
:
http://blog.csdn.net/andkylee
--- 2010-05-31 22:56:43
---- ¹Ø¼ü×Ö£º oracle ·ÖÒ³ rownum
--------------------------------- ......
ÓÐЩ³£¼ûµÄÎÊÌâÔÚÂÛ̳Öв»¶Ï³öÏÖ£¬²»·ÁÕûÀíһϡ£
ÒÔÏÂÓï¾äÊÇÔÚSQLServer2005ÉÏʵÏֵģ¬Ò»Ð©Óï¾äÎÞ·¨ÔÚSS2000ÉÏÖ´ÐС£
ÓÐÓÃÖ¸ÊýÊÇÎÒ¸ù¾ÝÕâ¸öÎÊÌâµÄ³£¼û³Ì¶È´òµÄ·Ö£¬½ö¹©²Î¿¼¡£Êµ¼ÊÉÏ£¬µ±ÄãÓöµ½ÁËÕâ¸öÎÊÌ⣬Õâ¸öÎÊÌâÄÄÅÂÔÙÉÙ¼û£¬½â¾ö·½°¸Ò²ÊǷdz£ÓÐÓõġ£
1. Éú³ÉÈô¸ÉÐмǼ
ÓÐÓÃÖ¸Êý£º¡ï¡ï¡ï¡ï¡ï
³£¼ûµÄÎÊÌâÀàÐÍ£º¸ù¾Ý ......