Common SQL statements in Oracle

Source: Internet
Author: User

1. Check which users are in the database?
Select username from all_users;
2. Check which DBA users are in the database?
Select username from dba_users;
3. view the tables owned by the current user?
Select table_name from user_tables;
4. How do I create a tablespace in Oracle and create a user?
A. Create a tablespace.
Create tablespace blueskydb datafile 'd: \ oracle \ product \ 10.2.0 \ oradata \ bluesky \ blueskydb. dbf' size 500 m;
B. Create a user
Create user bluesky identified by bluesky;
C. user authorization
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. You can try using sqlplus or other tools!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.