获得当前时间的PRO

1.没有参数的存储过程

create or replace procedure get_time
as
   cur_time varchar2(10);
begin
  select to_char(sysdate,'yyyymmdd') into cur_time from dual;
  dbms_output.put_line(cur_time);
end;

call get_time();

2.有输出参数的存储过程
create or replace procedure get_time(cur_time out varchar2)
as
begin
  select to_char(sysdate,'yyyymmdd') into cur_time from dual;
end;

declare
  cur_time varchar2(10);
begin
  get_time(cur_time);
  dbms_output.put_line(cur_time);
end;

上一篇:CMake语法—打印帮助(CMakePrintHelpers)


下一篇:Golang-如何优雅的关闭channel?