MySQL Basic knowledge Summary

Source: Internet
Author: User
Tags aliases bulk insert mysql client sql error
First, what database
Ii. Classification of databases

relational database (understanding)

Non-relational database

Third, MySQL database

Directory structure of MySQL

MySQL client/server

Related terms

Sql

MySQL Client type

MySQL Log in

Iv. Database Operations

View Database

Create a database

To view the creation command for a database

Deletion of the database

V. Setting up the client character set
Vi. operation of data sheets

Select Database

View Data Sheet

Create a data table

View the creation statement for a data table

Delete a table

Effects after creating a table

Effects after deleting a data table

Data type

Vii. Types of data

Numeric type

String

Viii. Data manipulation

Inserting data

Update data

Query statements

Delete data

Ix. Types of data

Numeric type

String

Date-Time Type

X. Additional properties Column Properties

Not NULL value

Default Defaults

Unique only

Auto_increment Self-growth

Primary key

12. Operation of Column Properties

View Column Properties

Remove NOT NULL constraint

Delete Default

Delete Unique

Remove Auto_increment self-growth property

Delete primary key

Add primary Key

Add unique

Composite PRIMARY Key

Analog PRIMARY Key

13. Adding column properties by modifying the table structure

Add NOT NULL

Add default

Add Auto_increment

Add unique

Add primary Key

14. Modification of table structure

Add Field

Delete a field

modifying field types

Modify field names

Modify Table Name

16. Advanced Operation

Duplicate table structure

Create tables to replicate table data at the same time

BULK INSERT Data

Worm Replication

Primary key violation (update)

Primary key conflict (replace)

17. Advanced Inquiry

"All|distinct"

*

Field aliases

Table Aliases

Data source

"WHERE clause"

"GROUP BY clause"

"HAVING clause"

"ORDER BY clause"

"Limit clause"

18, sub-query

What are sub-queries?

Classification of sub-queries

19. Relationship (understanding)

What is a relationship

Classification of relationships

20, foreign key foreign key

Storage Engine (Learn)

MySQL storage engine (Learn)

FOREIGN key Creation

To add a foreign key by modifying the table structure

Deletion of foreign keys

Constraints on foreign keys

21. Character Set and check set

View

Check Set (understanding)

Check Set classification

22. Joint Inquiry

What joint query

Grammar:

Role

23. Connection Query

Intersection connection

Internal connection

External connection

Natural Connection (Learn)

Using keyword

24. Backup and restore of database (understanding)

Physical backup

Data backup and restore

SQL backup

25. Security of affairs

Transaction

Transaction security

26. MySQL Transaction classification

Automatic transactions

Manual transactions

Rollback points in a transaction

27, the acid of the transaction (understanding)

28. Permission operation

Create user

View User

Authorizing a user

Remove permissions from a user

Delete User

Modify User Password

29. PHP Operation MySQL

Landing

Set character sets

Select Database

Operate the database on demand

①. Inserting data
②. Updating of data
③. Deletion of data
④. Querying the data

Fetching data from the result set of a Select

MYSQL_INSERT_ID ();

About SQL error message functions

Freeing resources

30., about the return value of mysql_query ():
31. SQL statement Execution function
32. Get the number of rows affected

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.