oracle ÕÒ³öÁ½±íÖ®¼äÖظ´Êý¾Ý
select * from ( select tb1.rollid from (select r.rollid as rollid from zh1_rool r where r.date_p >=to_date('2009-11-26 23:59:59','yyyy-mm-dd hh24:mi:ss') ) tb1
¡¡¡¡where tb1.rowid !=
¡¡¡¡(
select max(tb2.rown) from (select t.rowid as rown,t.lot_number as rollid
from inv.mtl_onhand_quantities_detail t
left join mtl_system_items_b mi
on t.inventory_item_id = mi.inventory_item_id
where mi.segment1 like '101%' and mi.organization_id = 102) tb2
where tb2.rollid=tb1.rollid
¡¡¡¡) )tb3
Ïà¹ØÎĵµ£º
ѧϰOracle DBAÒ²°ë¸ö¶àѧÆÚÁË£¬½ñÌìÃÍÈ»²Å·¢ÏÖ£¬ÔÀ´ÎÒµÄÊ黹ÊǺÜеģ¬ÉϿβÙ×÷ʱºòÒ²Ö»ÊÇÖªµÀ´ó¸ÅÔõô×ö£¬µ«ÊÇÒªÕæµÄÈ«²¿×Ô¼º×ö£¬¶ø²»È¥·Ê黹ÊÇÓÐÒ»¶¨µÄÄѶȵģ¬ËùÒÔÄØ£¬½ñÌ쿪ʼ½«DBA´ÓÍ·¸´Ï°Ò»±é£¬Í¬Ê±ÔÙ²Ù×÷Ò»±é¡£
µÚÒ»Õ£¬Ñ§µÄÊÇOracleµÄÌåϵ½á¹¹£ ......
oracle Ô¼ÊøµÄ״̬
oracleÔÚ´´½¨Ô¼ÊøºóĬÈÏ״̬ÊÇenabled VALIDATED
SQL> create table T2
2 (
3 VID NUMBER,
4 VNAME VARCHAR2(10) not null,
5 VSEX VARCHAR2(10) not null
6 )
7 /
Table created
SQL> alter table t2 add constraints PK_T primary key (vid); ......
Èç¹ûÄãÒª°ÑOracleÀïµÄ´óÁ¿Êý¾Ý(80MÒÔÉÏ)תÒƵ½ÁíÍâµÄÓû§£¬ÁíÍâµÄ±í¿Õ¼äÀï¡£¿ÉÒÔÓÃÏÂÃæ½éÉܵĿìËÙתÒÆÊý¾ÝµÄ·½·¨¡£
Ò»¡¢½¨Ð±íµÄ·½Ê½
create table target_tablename tablespace
target_tablespace_name nologging
pctfree 10 pctused 60
storage(initial 5M next 5M minextents 1
maxextents unlimited pctincr ......
PL/SQLµ¥Ðк¯ÊýºÍ×麯ÊýÏê½â
º¯ÊýÊÇÒ»ÖÖÓÐÁã¸ö»ò¶à¸ö²ÎÊý²¢ÇÒÓÐÒ»¸ö·µ»ØÖµµÄ³ÌÐò¡£ÔÚSQLÖÐOracleÄÚ½¨ÁËһϵÁк¯Êý£¬
ÕâЩº¯Êý¶¼¿É±»³ÆΪSQL»òPL/SQLÓï¾ä£¬º¯ÊýÖ÷Òª·ÖΪÁ½´óÀࣺ
µ¥Ðк¯Êý
×麯Êý
±¾ÎĽ«ÌÖÂÛÈçºÎÀûÓõ¥Ðк¯ÊýÒÔ¼°Ê¹ÓùæÔò¡£
SQLÖеĵ¥Ðк¯Êý
SQLºÍPL/SQLÖÐ×Ô´øºÜ¶àÀàÐ͵ĺ¯Êý£¬ÓÐ×Ö·û¡¢Êý×Ö¡¢ÈÕÆÚ¡¢×ª ......