create table EGMAS_COUNT_DATA(TIMES date not null, COUNT NUMBER(30) not null, SYSTEM_NAME VARCHAR2(30) not null, Operation_index VARCHAR2(30) not null);-- Add comments to the columns comment on column EGMAS_COUNT_DATA.TIMES is '日期';comment on c
--创建新增本地数据库的存储过程create or replaceprocedure pro_electric_record as begin insert into electric_meter_record(id,basestation_id,name,meter_number,createtime,electric_meter_id) select sys_guid(),substr(s.sname,0,36),s.sname,s.svalue,sysdate,(select
需求 一个用户下三个表,开发人员不定时进行rename表名称,create原表名称 as old_table 插入少量数据,另一个业务用户需要访问该表,由于表名称rename导致经常需要手工授权. 需求转型12.1,新创建的表,自动给开发用户进行授权,由于用户很多,因此新表对角色进行授权. 一.模拟场景 目标表hr.t1,业务用户scott SQL> create table hr.t1 as select * from hr.employees; SQL> grant select on h
1.存储过程建立的格式: create or replace procedure My_Procedure is begin --执行部分(函数内容); end; / 例子:(以hr表为例) create or replace procedure insert_procedure isbegininsert into JOBS values('MY_JOB','My Job',5000,10000);end;/ 2.存储过程调用 begininsert_procedure();end/ 3.函数