標籤:http://database.51cto.com/art/201004/196538.htm以下的文章主要介紹Oracle資料庫exp imp按相關的使用者來匯出匯入相關執行個體,第一步我們要從一台windows伺服器 A 上匯出關於 Test1 這個使用者的所有對象,然後匯入到linux伺服器 B 上的 Test2使用者。(已知Test1密碼為Test1passwd 或者用system使用者匯出也行)2.B機器上Test2使用者不存在,或Test2使用者已經存在
標籤:一:產生部門使用者擁有的查看許可權資訊create or replace procedure refreshUseridOfCityas cursor c_job is select id,dept_code,dept_name from ram_department order by dept_code;--定義遊標 c_row c_job%rowtype; --定義一個遊標變數c_row ,該類型為遊標c_job中的一行資料類型 v_result varchar2(2
標籤:[[email protected] ~]# su - oracle[[email protected] ~]$ vi /home/oracle/.bash_profile # .bash_profile# Get the aliases and functionsif [ -f ~/.bashrc ]; then . ~/.bashrcfi# User specific environment and startup
標籤:1. 複製表結構及其資料: create table table_name_new as select * from table_name_old 2. 只複製表結構: create table table_name_new as select * from table_name_old where 1=2; 或者: create table table_name_new like table_name_old 3. 只複製表資料:如果兩個表結構一樣:insert into
標籤:select to_char(0.1) nums from dual;觀察發現如果小數的整數位是0, 轉換字串之後沒有了前面的0,如果需要前面的0,則需要一定的規則進行格式化,樣本如下select to_char(0.1,‘0.9‘) nums from dual;我們把小數換成整數後再看select to_char(1,‘0.9‘) nums from
標籤:SQL UNION 操作符UNION 操作符用於合并兩個或多個 SELECT 語句的結果集。請注意,UNION 內部的 SELECT 語句必須擁有相同數量的列。列也必須擁有相似的資料類型。同時,每條 SELECT 語句中的列的順序必須相同。SQL UNION 文法SELECT column_name(s) FROM table_name1UNIONSELECT column_name(s) FROM table_name2注釋:預設地,UNION