--新增字段
alter table epf_finance add descrip varchar2(4000);
--修改表字段长度
alter table epf_finance modify purpose varchar2(100);
--修改字段类型
alter table epf_finance modify purpose number;
--修改字段名字
alter table epf_finance rename column descrip to mark;
--删除字段
alter table epf_finance drop column mark;
--创建同义词
create or replace synonym apps.HR for hwcust.HR;
--授权
grant insert,update,delete on epf_finance to HR with grant option;
grant debug any procedure, debug connect session to HR;
--创建索引用于查询
CREATE INDEX HR_JOB_ID_INDEX ON JOBS(JOB_ID) tablespace USERS;
--查询一个用户拥有的系统权限
select * from dba_sys_privs where grantee ='HR';
--查看用户下面有多少个角色;
select * from dba_role_privs where grantee='HR';
PLSQL中一些常见的表字段操作
最新推荐文章于 2025-05-20 12:00:23 发布