Oracle创建视图 及 授权
- 创建视图语句:
CREATE VIEW GRM_PROFIT_VIEW AS SELECT ID, DEPT_CODE, DEPT_NAME, YMONTH, PROJECT_NAME, PROJECT_ROW, MONTH_ACCOUNT, YEAR_ACCOUNT, LASTYEAR_ACCOUNT, ADD_MIN_ACCOUNT, ADD_MIN_RATE, UPDATE_TIME, REMARK FROM GRM_PROFIT
- Oracle用户创建及授权
--创建用户 pinggao_kf_client,密码为 pinggao_kf_client2019 create user pinggao_kf_client identified by pinggao_kf_client2019; --授权connect,resource角色 grant connect to pinggao_kf_client; grant resource to pinggao_kf_client; --授权查看 PINGGAO_KF.INDEX_SALE_VIEW 视图 grant select on PINGGAO_KF.INDEX_SALE_VIEW to pinggao_kf_client; --授予pinggao_kf_client用户创建视图权限 grant create view to pinggao_kf_client