Temporary Summary of Oracle databases-1

Source: Internet
Author: User

Temporary Summary of Oracle databases-1

I haven't published a blog for a long time. I have learned mysql before learning oracle. I thought it would be much easier to learn oracle. However, I was wrong, oracle is more difficult than mysql, mainly in the following aspects:

1: The permission system of Oracle is complicated. However, it must be said that this is the most essential part of oracle.

2: concepts such as Oracle models, solutions, and instances are easily confused with previous knowledge about database learning.

3: Although oracle is the most simplified, the so-called "greatest truths to simplicity", it is undeniable that there are also complicated aspects, such as data paging of Oracle;

4: it is obvious that Oracle is relatively difficult to deploy.

At first, I used my previous database basics to learn and found that this was not the case. In comparison, it would be quite tiring. Finally, I had to make myself dizzy and changed my mind, it is very important to give up the previous concept of a database. Otherwise, the difference between the instance and the database will always be hard to understand. The only difference between the two is that, the following will not be dizzy.

The following one o'clock may cause errors when it comes to a specific database operation:

 

-- Insert into Table Name (field content) select * from table name by means of worm replication; -- set pagesize by Oracle; select * from table name by page; -- Table query -- filter duplicate field content select distinct field from table name; -- field reference name-single quotation marks must be added to select field name 'reference name' from table name; -- batch query by field select * from table name where field name in (field value 1, field value 2, field value 3 ); -- use order BY-select * from table name order by field asc BY by default; -- use order BY-select * from table name order by field desc BY default; -- sort by column alias select * from field name or expression as Alias from table name where order by field desc ; -- Table operation -- except for Oracle deletion fields, brackets are required. Other field operations of Orcle and Mysql can be left blank. -- add a field.-spaces in the brackets are not quotation marks, oracle only uses single quotes to add the alter table name add (field Name field type); -- modifies the field type alter table name modify (field Name field type ); -- modify Field Type-mysqlalter table name modify Field Name field type; -- delete field alter table Name drop column field name -- delete primary key alter table name drop primary key field name; -- add the primary key alter table name add primary key (field name); -- modify the table name rename table name to the modified table name; -- Modify Field name -- data operation CRUD -- insert data into Table Name (field name 1, field name 2, ...) Values (data 1, data 2 ,...); -- Delete data delete from table name where condition; -- modify data update table name set field = field value where record condition; -- query data select field from table name; -- select statements are the most complex and must be used flexibly! Key points !!!


Related Article

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.