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;
相关文档:
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.
& ......
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'
......
基本从来不用left/right join
一个项目被迫要用别人写的 sql
本打算改写一下,提高效率
发现:
【1】
select * from a
left outer join b on a.id= b.id AND ...1...
where ...2...
与
【2】
select * from a , b
where a.id= b.id(+)
A ......
1、Oracle里面用户的密码是进行加密保存的,所以只能重新修改生成新的密码.
利用系统管理员(sys)登录,将scott用户的密码修改即可
SQL>conn / as sysdba ;
已连接。
SQL>alter user scott identified by tiger ;
用户已更改。
当然也可以到WEB端进行修改地址如下:
http://localhsot:1158/em(相应的服务必 ......