Although rotten, also need to remember (MySQL)

Source: Internet
Author: User

1. Command line login: Mysql-u xxx-p-H localhost-p 3306, enter password, return login

2. Get help, helping xxx, \h xxx do not add semicolons at the back

3.exit,quit Exit Program

4.MySQL Administrator (estimation bias Management) MySQL query Browser (probably biased), anyway, there are coincident

5. Select database use XXX;

Show all databases show databases;

Show all tables in the current library show tables; All tables in any library show tables from XXX

All columns in any table show columns from XXX; or describe xxx;

Show Create datebase; Show create TABLE, which displays the MySQL statement that created the specific database or table

(Show status,show grants;show errors;show warnings;)

Select

1.DISTINCT xxx,xxx DISTINCT keyword applies to all columns, not just the first one

2.limit m,n m, n lines equal to limit n offset m (row m begins to fetch n rows, including row m; the first row is row 0, not line 1)

3.desc applies only the column name in front of it, xxx order by Prod_price desc,prod_name desc

4. Select xxx from xxx where xxx order by XX limit M,n

5.NULL: does not match NULL when selecting rows that do not have a specific value by filtering

Although rotten, also need to remember (MySQL)

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.