A simple description of the MySQL case (keyword/function/table name)

Source: Internet
Author: User

The letter-case rule in the MySQL statement varies with the statement element and depends on the operating system on the MySQL server host.

SQL keyword and function name

Keywords and function names do not distinguish between uppercase and lowercase letters. such as, ABS, Bin, now, version, floor and other functions, SELECT, WHERE, ORDER, GROUP by and other keywords.

Names of databases, data tables, and views

On the server host, the MySQL database and data tables are represented by directories and files in the underlying file system. Therefore, the default letter case for database and data table names depends on the rules of the operating system on the server host for file name. Windows filenames are case-insensitive, so the MySQL server running on a Windows host does not differentiate between the case of the database and the name of the data table. The MySQL server running on the Unix\linux host differentiates the case of database and data table names. (But Linux can be configured to ignore case)

MySQL uses a file to represent a view, so the view also conforms to the above rules.

The name of the stored program

The names of stored functions, stored procedures, and events are case-insensitive. The name of the trigger is to distinguish the case of the letter.

Names of data columns and indexes

The names of data columns and indexes are not distinguished by the case of letters in the MySQL environment. Examples are as follows:

String value

String values are case-sensitive, depending on whether it is binary or non-binary, and non-binary characters depend on how the character set is sorted.

Reference:

http://blog.csdn.net/hsd2012/article/details/51436946 (the above content is transferred from this article)

http://blog.csdn.net/shuaijunlan/article/details/51505614

http://blog.csdn.net/msibigbang/article/details/8863048

http://blog.csdn.net/kai404/article/details/52169108

http://blog.csdn.net/bluishglc/article/details/7634969

http://blog.csdn.net/cnhk1225/article/details/56290005

http://blog.csdn.net/xinew/article/details/5856105

http://blog.csdn.net/mascf/article/details/53349831

http://blog.csdn.net/xinew/article/details/5856263

http://blog.csdn.net/t_332741160/article/details/54346428

http://blog.csdn.net/zzhongcy/article/details/41316289

http://blog.csdn.net/workaccumulate/article/details/42143963

http://blog.csdn.net/willpan1234/article/details/56015396

http://blog.csdn.net/boya734698063/article/details/38421419

http://blog.csdn.net/neutrojan/article/details/8147752

A simple description of the MySQL case (keyword/function/table name) (GO)

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.