Oracle 常用的SQL語句
更新時(shí)間:2009年07月31日 15:36:50 作者:
Oracle 常用的SQL語句。
1、查看數(shù)據(jù)庫中有哪些用戶?
select username from all_users;
2、查看數(shù)據(jù)庫中有哪些DBA用戶?
select username from dba_users;
3、查看當(dāng)前用戶擁有哪些表?
select table_name from user_tables;
4、Oracle新建表空間,建立用戶的步驟?
A,創(chuàng)建表空間
create tablespace blueskydb datafile 'D:\oracle\product\10.2.0\oradata\bluesky\blueskydb.dbf' size 500m;
B、新建用戶
create user bluesky identified by bluesky;
C、用戶授權(quán)
grant resource, connect, RECOVERY_CATALOG_OWNER to bluesky;
grant create table to bluesky;
alter user bluesky quota unlimited on blueskydb;
alter user bluesky default tablespace blueskydb;
D、這樣就可以了,使用SQLPLUS或其他的工具連接試試吧!
select username from all_users;
2、查看數(shù)據(jù)庫中有哪些DBA用戶?
select username from dba_users;
3、查看當(dāng)前用戶擁有哪些表?
select table_name from user_tables;
4、Oracle新建表空間,建立用戶的步驟?
A,創(chuàng)建表空間
create tablespace blueskydb datafile 'D:\oracle\product\10.2.0\oradata\bluesky\blueskydb.dbf' size 500m;
B、新建用戶
create user bluesky identified by bluesky;
C、用戶授權(quán)
grant resource, connect, RECOVERY_CATALOG_OWNER to bluesky;
grant create table to bluesky;
alter user bluesky quota unlimited on blueskydb;
alter user bluesky default tablespace blueskydb;
D、這樣就可以了,使用SQLPLUS或其他的工具連接試試吧!
相關(guān)文章
oracle中利用關(guān)鍵字rownum查詢前20名員工信息及rownum用法
這篇文章主要介紹了oracle中利用關(guān)鍵字rownum查詢前20名員工信息,本文通過代碼給大家簡(jiǎn)單介紹了ORACLE 中ROWNUM用法,非常不錯(cuò),具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2019-04-04
sqlplus 命令登錄 Oracle數(shù)據(jù)庫的多種方法
這篇文章主要介紹了sqlplus 命令登錄 Oracle數(shù)據(jù)庫的兩種方法,方式一通過sql*plus 命令窗口,方式2:通過 cmd 窗口,每種方式給大家介紹的非常詳細(xì),需要的朋友可以參考下2021-09-09
Oracle中手動(dòng)刪除數(shù)據(jù)庫教程
這篇文章主要介紹了Oracle中手動(dòng)刪除數(shù)據(jù)庫教程,本文給出了詳細(xì)步驟以及清除ASM數(shù)據(jù)庫的步驟,需要的朋友可以參考下2014-10-10
oracle如何合并多個(gè)sys_refcursor詳解
這篇文章主要給大家介紹了關(guān)于oracle如何合并多個(gè)sys_refcursor的相關(guān)資料,以及在文末跟大家分享了sys_refcursor 和 cursor 優(yōu)缺點(diǎn)的比較,文中通過示例代碼介紹的非常詳細(xì),需要的朋友可以參考借鑒,下面來一起學(xué)習(xí)學(xué)習(xí)吧2018-05-05
使用Oracle命令進(jìn)行數(shù)據(jù)庫備份與還原
本文詳細(xì)講解了使用Oracle命令進(jìn)行數(shù)據(jù)庫備份與還原的方法,文中通過示例代碼介紹的非常詳細(xì)。對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧<BR>2021-12-12
在Oracle數(shù)據(jù)庫中添加外鍵約束的方法詳解
這篇文章主要介紹了在Oracle數(shù)據(jù)庫中添加外鍵約束的方法,需要的朋友可以參考下2016-01-01
Oracle 計(jì)算時(shí)間格式平均值的sql 語句
這篇文章主要介紹了Oracle 計(jì)算時(shí)間格式平均值的sql 語句,非常不錯(cuò),具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2019-08-08

