Home > Database > Mysql Tutorial > Summary of MySQL basic knowledge

Summary of MySQL basic knowledge

无忌哥哥
Release: 2018-07-18 09:33:09
Original
1649 people have browsed it

1. What database
2. Classification of databases

Relational database (understand)

Non-relational database

3. MySQL database

MySQL directory structure

MySQL client/server

Related terms

SQL

MySQL client type

MySQL login

4. Database operation

View database

Create database

View database creation command

Delete database

5. Set client character set
6. Data table operation

Select database

View data table

Create data table

View the creation statement of the data table

Delete the table

The impact after creating the table

The impact after deleting the data table

Data type

7. Data type

Numeric type

String

8. Data operation

Insert data

Update data

Query statement

Delete data

9. Data type

Numeric type

String

Date time type

10. [Additional attributes] Column attributes

not null value

default default value

unique unique

auto_increment self-increment

primary key

12. Column attribute operations

View column attributes

Delete not null constraint

Delete default

Delete unique

Delete auto_increment self-increment attribute

Delete primary key

Add primary key

Add unique

Compound primary key

Simulate primary key

13. Add column attributes by modifying the table structure

Add not null

Add default

Add auto_increment

Add unique

Add primary key

14. Modification of table structure

Add fields

Delete fields

Modify field type

Modify field name

Modify table name

16. Advanced operations

Copy table structure

Create table Simultaneously copy table data

Batch insert data

Worm replication

Primary key conflict (update)

Primary key conflict (replacement)

十7. Advanced query

[all|distinct]

*

##Field alias

Table alias

Data source

[where clause]

[group by clause]

[having clause]

[order by clause]

[limit Clause】

18. Subquery

What is a subquery?

Classification of subqueries

19. Relationship (understanding)

What is a relationship

Classification of relationships

20. foreign key foreign key

Storage engine (understand)

MySQL storage engine (understand)

Foreign key creation

Add foreign key by modifying the table structure

Deletion of foreign keys

Constraints of foreign keys

21. Character set and verification set

View

Correction Verification set (understanding)

Verification set classification

22. Joint query

What is the joint query

Syntax:

Function

23. Connection query

Cross join

Inner join

Outer join

Natural join (understand)

using keywords

24. Database backup and restoration (understanding)

Physical backup

Data backup and restoration

sql Backup

25. Transaction Security

Transaction

Transaction Security

26. MySQL Transaction Classification

Automatic Transaction

Manual transaction

Rollback point in transaction

27. ACID of transaction (understand)

28.Permission operation

Create user

View user

Authorize user

Remove user permission

Delete user

Modify user password

Twenty-nine, PHP operation MySQL

Log in

Set character set

Select the database

Operation database according to needs

①. Insert data

②. Update data
③. Delete data
④. Query data

Get data from the select result set

mysql_insert_id();

About SQL error message function

Release resources

Thirty. About the return value of mysql_query():

Thirty-one, SQL Statement execution function
32. Get the number of affected rows


The above is the detailed content of Summary of MySQL basic knowledge. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template