The difference between MySQL and Oracle

Source: Internet
Author: User

Differences in grammar

1, Oracle does not have offet,limit keyword , so in Oracle to be paged, to be replaced by rownum.

2, when the Oracle builds the table, does not have the auto_increment, all wants to let the table's primary key increment, wants to add the sequence itself.

3, Oracle has a dual table, when the select does not have a table, plus. No error will be added. Select 1 This will not be the error in MySQL, Oracle next. Select 1 from dual this way, Oracle does not get an error.

4, the determination of the null value, name! = "" This will not be an error in MySQL, but Oracle will error. Under Oracle, change to name is not null

5, Oracle under the single quotation marks, double quotation marks are required, generally do not use double quotation marks, using the error (Error at line 1:ora-00904: "T": invalid identifier), and MySQL has no such restrictions.

6, the Oracle table field is number type, if you $post get the parameter is 123456, in the storage, you need to use to_number,to_date such a function to cast, otherwise it will be treated as a string. and MySQL doesn't.

7, Group_concat This function, Oracle is not, if you want to use the self-written method.

8, MySQL user Rights Management, is placed in the MySQL automatic band of a database MySQL inside, and Oracle is User rights are rooted in the table space walk. (I feel I have to understand it)

9. If you use group by under Oracle, the field behind group by must appear behind the Select, otherwise it will be an error, and MySQL will not.

10, MySQL storage engine has many, commonly used mysiam,innodb, and so on, and when the Oracle table is created, it seems that there is only one storage engine.

11, the Oracle field cannot choose the location, ALTER TABLE Add column Before|after, this will be an error, even if you use sql*plus such tools, you can not change the location of the field.

12, Oracle table field type is not much MySQL, and there are many different, for example: MySQL int,float for the number class of Oracle and so on.

13, Oracle Query from the table after the name can not add as or will be error, select T.username from Test as T and under the MySQL is possible.

14, there is no substring this function in Oracle, MySQL is some.

Ii. table type conversions for MySQL porting to Oracle

MYSQL Oracleblob ( -) RAW ( -) BLOB ( -) RAW ( -) BLOG (1024x768) RAW (1024x768) VARCHAR (n) VARCHAR2 (n)Char charFLOAT ( A,6) Number ( A,6) DOUBLE ( -, A) Number ( -, A) TINYINT (3) Number (3) SMALLINT (5) Number (5) Mediumint (8) Number (8) INT (Ten) Number (Ten) BIGINT ( -) Number ( -) datatime DATA

Appendix:

See the Great God's blog: http://www.cnblogs.com/HondaHsu

The difference between MySQL and Oracle

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.