Mysql introductory tutorial

Mysql5.5 download address Baidu
Mysql5.5 installation tutorial
https://blog.csdn.net/ryan_woo/article/details/93710357f2148a81a.html
Mysql startup tutorial
https://jingyan.baidu.com/article/046a7b3edb853df9c27fa982.html
Navicat download Find the tutorial for the cracked version
http://www.ddooo.com/softdown/20238.htm
sql is a statement for manipulating data in the database, which will be slightly different in different databases, such as mysql, postgreSQL, oracle, sqlserver, sqlite, etc. etc., but the basic select, insert, update and delete statements of sql are all the same. This article only introduces how to use navicat visualization tool to learn the basics of select, insert, update and delete of sql statements in mysql. These four statements are sql The basics are the basics, but they are inseparable from it, and other complex sentences are also combinations of these four sentences.
select——query
insert——insert
update——update
delete——delete
from——from which table
where——query condition
join——table connection
order by
—— , and start the service flag:
1. Right-click on the computer - management - services and applications - services, check whether the mysql service is enabled

write picture description here
2. Open the navicat software and connect navicat to the local mysql service:

write picture description here

Click connection - select mysql, the following interface appears:

Fill in the information according to the information in installing mysql by yourself. The following message appears, which proves that the connection is successful:

write picture description here

3. Create a database
First open a window to execute the SQL statement:
write picture description here

Execute the sql statement to create the database
write picture description here

Then you can see the newly created sqltest database.
Fourth , the statement to create the table
write picture description here

First, open the sqltest database window to execute sql. Note that the window that you just opened to execute sql is the window to execute the sql of the entire database. Now we want to execute the sql statement in the sqltest database, then we need to open the sql window of sqltest.
Right-click Querries at the red arrow in the figure above to create a new query, which opens the window for executing sql,
and then executes the sql statement to create the table:
write picture description here

Use the software to add a piece of data:

write picture description here

Five: insert statement:
open the window for executing the sql statement and write the sql statement:

write picture description here

This sql statement means, add a piece of data to the test table, the id is 2, the name is test2, and the age is 21,
refresh the test table, and you can see that there is an extra piece of data just inserted in the test table.
Six, select statement
Use the select statement to view the data in the table:
select * means to query all attributes,
the following is the sql statement with query conditions:

write picture description here
The meaning of this sql statement is to query the data with id 1 in the test table, and query the name attribute and age attribute of this data.
Seven, update statement

write picture description here

Eight, delete statement

write picture description here

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327071500&siteId=291194637