Oracle (3) Database

Source: Internet
Author: User

Lock:


<喎?http: www.bkjia.com kf ware vc " target="_blank" class="keylink"> VcD4KPHA + MS7NrMqxtPK/qsG9uPa0sL/fingerprint + uPy4xNDVw/ujusutz8jM4b27y62 + zc/fingerprint "http://www.2cto.com/uploadfile/Collfiles/20140421/2014042108535533.jpg" alt = "\">


2. Row-Level Lock

SELECT... For update Syntax:




Wait


3. Table-Level Lock:

(1) shared lock:


(2) exclusive lock:


(3) deadlock



4. Table Partitioning

(1) range partitioning




Insert (partition in two ranges)

(2) hash partitions

(3) List partition (allow users to organize irrelevant data together)



(4) composite Partition

(5) query the field tablespace (users is used by default to view the partition)

(6) add partitions

1. Last insert

Alter table sales (table Name) add partition p3 values less than (maxvalues );

2. insert it into a shard in the middle (split p3 into two shards)

Alter table sales

Split partition p3 at (2000)

Into (partition p21. partition p22 );

(7) delete partitions

Alter table sales drop partition p2;

(8) Partition truncation (delete all records in a specified partition)

Alter table sales truncate partition p2;

(9) merge partitions (must be Xiang ...? Http://www.bkjia.com/database/DB2/ "target =" _ blank "class =" keylink "> DB2rXEo6k8L3A + CjxwPkFMVEVSIFRBQkxFIHNhbGVzMiA8L3A + keywords" http://www.2cto.com/uploadfile/Collfiles/20140421/2014042108535856.jpg "alt =" \ ">

5. View All Tables and fields in Oracle

Get table:

Select table_name from user_tables; // The table of the current user

Select table_name from all_tables; // tables of all users

Select table_name from dba_tables; // includes the system table

Select table_name from dba_tables where owner = "username'

6. Create a common permission

Authorization:


Create Synonym

(1) Private (common)

(2) Public

Create or replace an existing Synonym

Delete Synonym

Drop synonym emp;

Drop public synonym emp;

7. Sequence


NEXTVAL returns the next value of the sequence

CURRVAL returns the current value of the sequence



8. Create an attempt


9. Modify the view by ing the table



10. delete a view

11. Violation


12. The view cannot be changed.


13. display time


14. Create an index

Due to the long time:


Index: (improves query speed (performance ))

Step 1: Sort



.

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.