Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The use and common operation of mysql graphical tools

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Use of MySQL graphical tools

(take Navicat for Mysql software as an example)

Use Navicat to connect to our database:

Click the link

Host name or IP address: that is, the computer name or IP address of the database installation computer localhost, 127.0.0.1

Port: the default port 3306 when MySQL is installed

User name: default user name root for MySql installation

Password: the password you specified during MySQL installation: root

Connection name: it's just a name, and the function is to let us know what the business is.

Click OK to complete the configuration of the above information:

Click J18 this database connection

Show all the databases

Several databases are clickable. Click to enter the corresponding database.

For the time being, we only pay attention to tables, queries and backups.

After clicking on the table, display all the tables below the database:

Click to query:

New query

The operator panel can write statements such as insert delete update create select, etc.

Click backup:

This page is mainly about the backup and recovery of the database.

Data operation statement

Add

Insert into table name (column name 1, column name 2, column name 3.) values (column name 1 value, column name 2 value, column name 3 value.)

Two ways to add data

Insert into stu (sid,sname,sage) values (1) Li Lin, 22)

Insert into stu values (1) Li Lin, 22)

Delete

Delete from table name

Delete from stu

Modify

Update table name set column name 1 = modified value, column name 2 = modified value

Update stu SET sage=23,sname=' Li Lin'

Modify the value of a row or column:

Update users set age=18 where name=' Li Lin'

Modify the age of Li Lin's row and the value of that column is 18

Data query statement

SELECT query content

FROM table name

WHERE condition

GROUP BY

HAVING

ORDER BY

LIMIT

Query all data

Select * from table name

Select * from stu

Query specified data according to criteria

Select * from table name where column name 1 = value and column name 2 = value.

Select * from stu where sid=9 and ssex=' female'

Query data and return the specified column

Select column name 1, column name 2 from stu

Select sid,sname from stu

Alias (nickname) for the specified return column

There are two ways:

Select column aliases, column 2 aliases 2... From table name

Select column name as alias, column name 2 as alias 2... From table name

Select sid student number, sname name, ssex gender from stu

Select sid as student number, sname as name, ssex as gender from stu

Use comparison operators in conditions

SELECT * FROM table name where field >

< >

=

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report