Database MySQL statement specification and operations database for each command line

Source: Internet
Author: User

Specification for MySQL statements

1. keyword and function name all uppercase

2. Database name, table name, field name all lowercase

3. The SQL statement must end with a semicolon

Manipulating databases in cmd with command line

First open the Mysql-u Representative account-p for the password--prompt \h means to change the prompt to localhost

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M00/89/E3/wKiom1ggTTKi1PIxAACzbJfkdQw525.png-wh_500x0-wm_3 -wmp_4-s_3645515612.png "style=" Float:none; "title=" Mysql.png "alt=" wkiom1ggttki1pixaaczbjfkdqw525.png-wh_50 "/ >

Change the prompt to more detailed information

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M02/89/E0/wKioL1ggTfSwHavHAAAlFU8D60E697.png-wh_500x0-wm_3 -wmp_4-s_675654577.png "title=" Mysql5.png "alt=" Wkiol1ggtfswhavhaaalfu8d60e697.png-wh_50 "/>

Create a database, view versions and view existing database tables

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M01/89/E0/wKioL1ggTTSRlyEwAACd-b0Am8s410.png-wh_500x0-wm_3 -wmp_4-s_683040860.png "style=" Float:none; "title=" Mysql2.png "alt=" wkiol1ggttsrlyewaacd-b0am8s410.png-wh_50 "/ >

Create a database named T2, and set the encoding format to GBK, if you want to modify the encoding of the database, do not need to delete the re-build, only need to modify the encoding format, there are also show

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M00/89/E0/wKioL1ggTTXjKE9OAACpLEaJ310847.png-wh_500x0-wm_3 -wmp_4-s_3723186874.png "style=" Float:none; "title=" Mysql3.png "alt=" wkiol1ggttxjke9oaacpleaj310847.png-wh_50 "/ >

Delete the T1 database and view the existing database, confirming that T1 is deleted

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M02/89/E3/wKiom1ggTTbRD97-AACljZ8zMhI158.png-wh_500x0-wm_3 -wmp_4-s_2166794837.png "style=" Float:none; "title=" Mysql4.png "alt=" wkiom1ggttbrd97-aacljz8zmhi158.png-wh_50 "/ >



This article is from the "11828641" blog, please be sure to keep this source http://11838641.blog.51cto.com/11828641/1870434

Database MySQL statement specification and operations database for each command line

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.