Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

oracle Function


5.µ÷Óú¯ÊýFN_ADDONE
--------------------
SQL> SET SERVEROUTPUT ON
SQL> DECLARE CNUM NUMBER;
  2  BEGIN
  3     CNUM := USER1_ADB.FN_ADDONE(3);
  4     DBMS_OUTPUT.PUT_LINE('CNUM = ' || CNUM);
  5  END;
  6  /
CNUM = 4
PL/SQL ¹ý³ÌÒѳɹ¦Íê³É¡£
6.ɾ³ýº¯ÊýFN_ADDONE
--------------------
SQL> DROP FUNCTION USER1_ADB.FN_ADDONE;


Ïà¹ØÎĵµ£º

oracle ²ã´Î»¯²éѯ

²ã´Î»¯²éѯ£º
select   [level],colomn,...from table
       [where where_clause]
       [   [start with start_condition]          [connect by prior prior_condition]&nbs ......

oracle systemÃÜÂëÍü¼Ç½â¾ö

1.ÓÃOracleÓû§µÇ½Linux·þÎñÆ÷;
2.ÔÚÖÕ¶Ë´°¿ÚÊäÈë sqlplus /nolog
   [oracle@hylinux ~]$ sqlplus /nolog
    SQL*Plus: Release 10.2.0.1.0 - Production on ÐÇÆÚ¶þ 7ÔÂ 29  14:26:16 2008
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
& ......

ÔÚORACLEµÃµ½Ä³¸ö±íµÄÖ÷¼ü×Ö¶ÎÃû

select column_name from all_cons_columns cc
where owner='SSH'  --SSHΪÓû§Ãû³Æ£¬Òª×¢Òâ´óСд
and table_name='SYS_DEPT' --SYS_DEPTΪ±íÃû£¬×¢Òâ´óСд
and exists (select 'x' from all_constraints c
where c.owner = cc.owner
and c.constraint_name = cc.constraint_name
and c.constraint_type ='P' ......

oracle instr


¶ÔÓÚinstrº¯Êý£¬ÎÒÃǾ­³£ÕâÑùʹÓ㺴ÓÒ»¸ö×Ö·û´®ÖвéÕÒÖ¸¶¨×Ó´®µÄλÖá£Àý
È磺
SQL> select
instr('yuechaotianyuechao','ao') position from dual;
 
  POSITION
----------
        
6
 
´Ó×Ö·û´®'yuechaotianyuechao'µÄµÚÒ»¸öλÖÿªÊ¼£¬Ïòºó² ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ