Oracle Database Temporary Summary-1

Source: Internet
Author: User

Long time no blog, in the study of Oracle has already learned MySQL, thought in learning Oracle should be a lot easier, but, I think wrong, Oracle is more difficult than MySQL on a level, mainly in the following areas to send:

1:oracle's authority system is more complex, but, it has to be said, this is the most essential part of Oracle.

2:oracle's models, schemes, examples and other concepts are easily confused with previous knowledge of the learning database.

3: Although there are some places where Oracle is the most simplified, the so-called "Boulevard to Jane", but, admittedly, there are more complex places, such as Oracle's data paging, etc.;

It is obvious that 4:oracle is relatively difficult to deploy.


At first, I also use the basis of the previous database to learn, found that it is not so, if compared, that is quite tired, and finally to get dizzy, all change the idea, first give up the previous database concept, this is very important, otherwise will always from the instance and the database the difference between the two is difficult to understand, Only this place crosses the past, the back will not faint.


Here's a little bit of a concrete database operation that might have errors:

--worm copy insert into table name (field contents) select * from table name;--oracle Set paging set Pagesize;select * from table name;--Table query--Filter repeating field contents SELECT DISTINCT field from table name;--field reference name-add single quotation mark select field name ' Reference name ' from table name;--Bulk query based on field select * from table name where field name in (field value 1, field value 2, field value 3);--order by use-Default from low To the high select * from table name order by field Asc;--order by use-default from high to low select * from table name order BY field desc;--Use column alias sort select * From field name or expression a s alias from table name where order by field desc;--table operation-except for Oracle's delete field requires parentheses, orcle and MySQL other field operations can be no slogan-add a field-parentheses is a space is not a quotation mark, Oracle adds data using only single quotes ALTER TABLE table name Add (field name fields type);--Modify field type ALTER TABLE name modify (field name fields type);--Modify field type-mysqlalter table table name Modify Word Paragraph Name field type;--delete field ALTER TABLE Name drop column field name--delete primary key ALTER TABLE name drop primary key fields name;--Increase primary key ALTER TABLE name add primary K EY (field name);--Modify Table name rename table name to modified table name;--Modify field name--Data manipulation crud--Insert data inserts 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 <span style= "color: #ff6666;" >select field from table name; </span>--select statement the most complex must be used flexibly! Focus on the Focus!!!


Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Oracle Database Temporary Summary-1

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.