20180529 Morning Lesson Records 20-mysql

Source: Internet
Author: User
1.MySQL need to redeploy, delete which two files and what commands to execute

Delete Arch and data directories

2.MySQL Create a DB, create a user to this DB has all permissions, password 123456, only allow 198.168.137.110 machine to access the database, how to write SQL

Create database db;
Grant all privileges the db.* to [e-mail protected] ' 198.168.137.110 ' identified by ' 123456 ';

3.MySQL about permission operations, what's our final command?

Flush privileges;

4. For a user to allow any computer to be able to access, what do you think the expression, how to modify the current user

% indicates any IP
Update mysql.user set host= '% ' where user = ' user ';
Flush privileges;

5. What is the View table field? Which commands can be implemented

Desc Tb_name;
Show columns from Tb_name;

6. What is the sort syntax and the default is descending?

ORDER BY xxx
Default to Ascending

7. What is the grouping syntax? What if we add the filter syntax? What's the point of note?

GROUP BY has
The fields for group by are in the query field

8. Talk about your understanding of the sub-table

is the temporary table formed by the query results.

9.union All and union what difference

Union will go to the union all not to heavy

10. What is the fuzzy query syntax? Just know the third letter is J so how to write

Like ' __j% '

What kinds of 11.join syntax

Left Join,right Join,inner Join

12.left join syntax, which table data is the most complete

Left table

20180529 Morning Lesson Records 20-mysql

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.