The difference between Oracle and MySQL

Source: Internet
Author: User
Tags comparison current time mysql in

1. Usage rules for group functions:

The group functions in MySQL are free to use in SELECT statements, but if there are group functions in the query in Oracle,

The other column names must be processed by the group function, or columns in the GROUP BY clause, and negative will be an error.

2, automatic growth of data type processing:

MySQL has an automatic growth data class (Auto_increment) that inserts records without manipulating this field, automatically getting data values,

There is no automatic growth data type in Oracle and you need to use the sequence serial number.

3, the single quotation mark processing:

MySQL can be wrapped in double quotes with its string, Oracle can only use single quotes.

4, page-Turning of the SQL statement processing:

MySQL page of the statement is relatively simple, with limit start position, the number of records, Oracle processing pages of the SQL statement is more cumbersome

Need the help of Numrow.

5, Date Processing:

The MySQL date field is divided into date and time two, and the Oracle Date field is only date, including days and seconds

MySQL stores the current time with Now (), Oracle uses sysdate, or converts a string into a date function to_date (' 2001-08-01 ', ' yyyy-mm-dd ').

6, the processing of empty characters

MySQL's Non-empty field also has empty content, Oracle defined a NON-EMPTY field does not allow empty content. Define the Oracle table structure by not NULL for MySQL.

Errors are generated when data is being directed. Therefore, to guide the data to judge the null character, if null or empty characters, you need to change it to a space string.

8. Fuzzy Comparison of strings

MySQL in the field name like% ' String% ', Oracle can also use the field name like% ' String% ' but this method cannot use the index,

Fast, using a string comparison function InStr (field name, ' string ') >0 will get more accurate lookup results.

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.