在oracle中建立只讀某幾張表許可權的使用者
create user donghx
identified by donghx
default tablespace CMGIS
temporary tablespace TEMP
profile DEFAULT;
grant connect to donghx;
grant select on cmgis.g_cmptr_dist_sum to donghx;
grant select on cmgis.g_grid_demog_sum to donghx;
grant select on cmgis.g_grid_mjr_cmptr_sum to donghx;
grant select on cmgis.g_poi_dist_sum to donghx;
grant select on cmgis.g_site_dist_sum to donghx;
grant select on cmgis.g_prvnc_demog_sum to donghx;
grant select on cmgis.g_site_trd_ar_sum to donghx;
相關推薦
在oracle中建立只讀某幾張表許可權的使用者
create user donghx identified by donghx default tablespace CMGIS temporary tablespace TEMP profile DEFAULT; grant connect to donghx
Oracle創建用戶,並賦於只讀某幾張表的權限
rep pla user 進入 ide itl synonym job tab #進入數據庫 su - oracle sqlplus / as sysdba #創建只讀用戶 create user kms identified by "123@456"; grant con
ORACLE中觸發器實現刪除一張表中資料同時刪除另一表中相關資料
這是我的第一篇部落格。 有兩張表:BOOK、PGEVIEW,分別有一個名為BOOKID的欄位 想實現的功能:刪除BOOK表中的一行資料時刪除與PAGEVIEW表中BOOKID相等的資料行 實現方法:在BOOK表中建立一個觸發器BOOK_TRG_DELETE,具體實現語句如下
Oracle中建立scott使用者表結構及初始化資料
文章目錄 1.部門表dept 2.僱員表emp 3.工資等級表salgrade 4.工資表bonus 由於安裝的是Oracle12c資料庫,沒有scott使用者。scott使用者中 dept、 emp、 salgrade、 b
ORACLE中建立表、對錶進行增刪改查的語法
最近在學習ORACLE,現將在ORACLE中建立表、對錶進行增刪該查的語法總結如下: 表是一種資料庫物件,是基本的資料儲存單位,由行和列組成 表的建立(以課程資訊表為例): CREATE TABLE OBJECTS
mysql把某一列的資料更新到另一列中(涉及到多張表的資料)
假設有三張表A,B,C現在要把C表中的一列資料更新到A表中,而A和C之間還有張B表。假設要把C表中的id更新到A表中,那麼就可以這樣寫:UPDATE A AINNER JOIN B ON A.xxx = B.xxxINNER JOIN C ON B.xxx= C.xxxSET
oracle中建立作業(跨表空間)
需求:每月1日執行,從TableSpace為SDE的幾張表中讀取每個工程的設施數量,儲存於TableSpace為SCOTT的T_DIC_MTTYP中 環境:PLSQL 步驟: 1. 建立儲存過程(在TableSpace為SC
oracle匯出指定幾張表的資料以逗號等為分隔符
程式碼示例 #!/bin/bash #====================Usage: sh exp.sh 264 Or ./exp.sh 264 import data fr
oracle中建立表主鍵id依據sequence自增長
SQL> create table sms_activity( 2 id number, 3 student_name varchar2(50), 4 begin_time varchar2(30), 5 end_time varchar2(
oracle中建立表時先判斷是否存在表再drop的SQL
在寫oracle的建立表的SQL時,為了SQL能夠反覆執行,一般都會在create前面加入drop表的語句,但這樣先drop再create的語句在第一次執行時,會報一個不存在該表的錯誤,查了一下,oracle中沒有像sybase那樣先判斷是否存在表再drop表的語句。
yii2.0 中刪除滿足某幾個條件的全部數據
lis variable 全部 let spa user 數據 ble not in 刪除user表中的type=2 and usercategoryid 不是1,2。3的全部數據User::deleteAll([ ‘and‘, ‘type = :type_id‘, [‘n
mysql中 如何合並兩張表
linux mysqlmysqldump -d:只導出表結構,不含數據 導出完整的數據庫的數據不含表結構 mysqldump -t :只導出數據,不含表結構 解決方法:mysqldump -t 在原來數據庫中,只把表數據導出來 然後 導入到要合並的數據庫裏面就可以 註意 : 如果不加 -t 會把表結構
【數據庫】Mysql中主鍵的幾種表設計組合的實際應用效果
研究 開始時間 action 設計 int rand 業務主鍵 primary 同時 寫在前面 前前後後忙忙碌碌,度過了新工作的三個月。博客許久未新,似乎對忙碌沒有一點點防備。總結下來三個月不斷的磨礪自己,努力從獨樂樂轉變到眾樂樂,體會到不一樣的是,連辦公
oracle:一個update修改兩張表
需求:用一個update語句修改兩張表? 思路:用觸發器來解決 觸發器程式碼: 表a:table_a,表b:table_b,其中表b裡面有表a的id,這個觸發器意思是當修改表a的最後修改人:table_a_last_chg_usr時,讓表b的最後修改人欄位也跟著修改table_b_las
Oracle中建立欄位自增長
Oracle中建立欄位自增長主要分為序列和觸發器兩部分 A.序列 CREATE SEQUENCE exam_sequence --序列名 MINVALUE 1 -- 最小值 MAXVALUE 999999999999999999999999999 -- 最大值 INCR
springboot整合jpa,在postgresql資料庫中建立主鍵自增表
依賴檔案 <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-ins
sql 中怎麼將A表插入B表中,,去除兩張 表中含有的重複資料
insert into B(欄位列表) select 欄位列表 from A where not exists(select * from B where a.keycol1 = b.keycol1) keycol1為A表和B 表中的欄位,可能帶有主鍵,可以此欄位來判斷A表和B表中是
【資料庫】Mysql中主鍵的幾種表設計組合的實際應用效果
寫在前面 前前後後忙忙碌碌,度過了新工作的三個月。部落格許久未新,似乎對忙碌沒有一點點防備。總結下來三個月不斷的磨礪自己,努力從獨樂樂轉變到眾樂樂,體會到不一樣的是,連辦公室的新玩意都能引起莫名的興趣了,作為一隻忙碌的 “猿” 倒不知正常與否。 咳咳, 正題, 今天要寫一篇
查詢Oracle中帶有Clob欄位的表的大小
在oracle裡面,由於lob欄位有獨立的lob segment來儲存,所以查詢需要DBA_SEGMENTS S, DBA_INDEXES 2張表結合才可查出結果。 以下是實驗SQL說明: 表名:GJ_NORM_POOL 表歸屬使用者名稱:ORACLE
Oracle中建立儲存過程和呼叫過程(一)
1、定義 所謂儲存過程(Stored Procedure),就是一組用於完成特定資料庫功能的SQL語句集,該SQL語句集經過 編譯後儲存在資料庫系統中。在使用時候,使用者通過指定已經定義的儲存過程名字並給出相應的儲存過程引數 來呼叫並執行