Chinaunix首页 | 论坛 | 博客
  • 博客访问: 155392
  • 博文数量: 66
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 20
  • 用 户 组: 普通用户
  • 注册时间: 2016-06-23 15:21
文章分类

全部博文(66)

文章存档

2016年(66)

我的朋友

分类: Oracle

2016-04-26 18:46:58

1:Connect oracle database

[tkms3in@linux-55:/home/tkms3in/rec/test20160324] $ sqlplus tkms3in/tkms3in@orcl60

SQL*Plus: Release 11.2.0.1.0 Production on Thu Mar 31 15:46:57 2016

Copyright (c) 1982, 2009, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> 



2:Creat store procedure sample

SQL> CREATE OR REPLACE PROCEDURE TT
  2  is
  3  begin
  4  DBMS_OUTPUT.PUT_LINE('SHABdddd');     
  5  END;
  6  /

Procedure created.




2:Run the procedure sample

SQL> SET SERVEROUTPUT ON;         (this line :can lead the result output to the screen)
SQL> EXECUTE TT;                               (this line:run the store procedure and the "TT" represent the sp_name)
SHABdddd                                                (this line:output result )                   

PL/SQL procedure successfully completed.






3:check the sp content

SQL> select * from user_source;             (this line :the sp_content is save in this table user_source)

NAME                           TYPE               LINE
------------------------------ ------------ ----------
TEXT
--------------------------------------------------------------------------------
TT                             PROCEDURE             1
PROCEDURE TT

TT                             PROCEDURE             2
is

TT                             PROCEDURE             3
begin


NAME                           TYPE               LINE
------------------------------ ------------ ----------
TEXT
--------------------------------------------------------------------------------
TT                             PROCEDURE             4
DBMS_OUTPUT.PUT_LINE('SHABdddd');

TT                             PROCEDURE             5
END;

阅读(2663) | 评论(0) | 转发(0) |
0

上一篇:高效率的字符比较

下一篇:定长报文

给主人留下些什么吧!~~