Home >Database >Mysql Tutorial >Oracle 常用的SQL语句

Oracle 常用的SQL语句

WBOY
WBOYOriginal
2016-06-07 18:06:42947browse

Oracle 常用的SQL语句。

1、查看数据库中有哪些用户?
select username from all_users;
2、查看数据库中有哪些DBA用户?
select username from dba_users;
3、查看当前用户拥有哪些表?
select table_name from user_tables;
4、Oracle新建表空间,建立用户的步骤?
A,创建表空间
create tablespace blueskydb datafile 'D:\oracle\product\10.2.0\oradata\bluesky\blueskydb.dbf' size 500m;
B、新建用户
create user bluesky identified by bluesky;
C、用户授权
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或其他的工具连接试试吧!
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn