標籤:使用者管理:1、建立使用者(要用dba許可權登入才能建立sys/system登入)create user 使用者名稱 identified by 密碼(密碼以字母開頭);2、給使用者修改密碼1>alter user 使用者名稱 identified by 新密碼;2>password 使用者名稱,然後提示你輸入新密碼3、刪除使用者drop user
標籤:oracle教程:PLSQL常用方法匯總 在SQLPLUS下,實現中-英字元集轉換alter session set nls_language=‘AMERICAN‘;alter session set nls_language=‘SIMPLIFIED CHINESE‘; 主要知識點:一、有關表的操作1)建表create table test as select * from dept; --從已知表複製資料和結構create table test as select *
標籤:測試環境:C:\ora12c\product\12.1.0\dbhome_1\BIN>sqlplus.exe /nologSQL*Plus: Release 12.1.0.1.0 Production on 星期二 9月 20 03:50:23 2016Copyright (c) 1982, 2013, Oracle. All rights reserved.SQL> conn /as sysdba已串連。SQL> show pdbs; CON_ID
標籤:1. CASE WHEN 運算式有兩種形式--簡單Case函數 CASE sex WHEN ‘1‘ THEN ‘男‘ WHEN ‘2‘ THEN ‘女‘ ELSE ‘其他‘ END --Case搜尋函數 CASEWHEN sex = ‘1‘ THEN ‘男‘ WHEN sex = ‘2‘ THEN ‘女‘ ELSE ‘其他‘ END 2. CASE WHEN 在語句中不同位置的用法2.1 SELECT CASE WHEN 用法SELECT grade,
標籤:select * from teacher--女性老師編號、姓名select tno,tname,gendar from teacher where gendar=‘女‘--姓韓的女性老師編號、姓名、社會安全號碼select tno,tname,tid from teacher where gendar=‘女‘ and tname like ‘韓%‘--薪水在[10000,20000)之間老師列表select sal,tname from teacher where sal
標籤:select * from teacher where tno>1090--回憶之前的MYSQL分頁select * from teacher limit (pageIndex-1)*pageSize,pageSize--oracle的分頁 需要偽列? 什麼是偽列!--偽列 可以從表中查詢的到!每個表都有這個偽列!但是不能對偽列--進行增刪改操作!偽列的值是不允許被改變的--rowid:儲存的是表中行的儲存地址,是唯一的!可以使用rowID定位到表中的一行--增長的規律:
標籤:select * from teacher--聯集查詢 --01.union (並集)select tno from teacher where tno>1080 union(select tno from teacher where tno>1090)--02.union all(並集並且顯示重複的資料)select tno from teacher where tno>1080 union all(select tno from teacher where
標籤:--查詢各個部門的編號,最高工資,總和,平均工資--並且按照個部門的總工資進行降序排列select deptno,max(sal),sum(sal),avg(sal)from teachergroup by deptno order by sum(sal) desc--再增加一個條件 並且 部門人數在10人以上的select deptno,max(sal),sum(sal),avg(sal)from teachergroup by deptnohaving count(deptno)&
Oracle 12c far sync active dataguard 架構使用DGMGRL管理配置最近一直在學習Oracle 12C 資料庫,所以進行了一些文檔梳理。 這裡我主要介紹如何在Oracle 12c far sync active dataguard 架構上配置DG Broker一:查看資料庫版本:SQL> col BANNER for a90SQL> select * from v$version;BANNER