码迷,mamicode.com
首页 > 数据库 > 详细

存储过程与Oracle中常见的数据字典的用法

时间:2020-04-25 23:37:41      阅读:136      评论:0      收藏:0      [点我收藏+]

标签:cal   varchar   str   tables   strong   过程   arch   exception   enc   

一个简单的存储过程:
create or replace procedure 
insert_user_procedure (id in number,name in varchar2,salary in number,result out varchar2) 
is begin 
    insert into t_user values(id,name,salary);
    result:=调用存储过程成功;
Exception
    when others then
    result:= 调用存储过程出错:  || SQLERRM;
end;

call insert_user_procedure(?,?,?,?)
通过数据字典查询:
    select table_name from user_tables;//查询表
    select sequence_name from user_sequences;//查询序列
    select index_name from user_indexs;//查询索引

存储过程与Oracle中常见的数据字典的用法

标签:cal   varchar   str   tables   strong   过程   arch   exception   enc   

原文地址:https://www.cnblogs.com/Magic-Li/p/12775939.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!