MySQL Type conversion considerations

Source: Internet
Author: User
Tags mysql database

One of the most recent jobs is to use the MSSQLServer database service before

Rewritten to support the MySQL database, some types of conversion functions are involved in SQL statements,

It turns out that MySQL's type conversion function "Convert" does not provide good data type name compatibility.

The parameters are not the same in order!

Using CONVERT (int, port) in SQL Server, convert (port, signed) as ' Port ' in MySQL

Note: If you do not add as ' Port ', the column name in the result set will appear as convert (port, signed)

In SQL Server, use brackets [] to troubleshoot special symbols, keywords, and so on, but you need to use reverse single quotes in MySQL ·

Commonly known as a small period, on the end, also known as heavy notes, the keyboard is the upper left corner ESC below the key, input without pressing SHIFT.

The data type used for conversion needs to be noted that this type can be one of the following values:

binary[(N)]

char[(N)]

DATE

Datetime

DECIMAL

Signed [INTEGER]

Time

UNSIGNED [INTEGER]

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.