Home > Database > Mysql Tutorial > body text

Detailed graphic and text explanation of using SQL statements to operate data tables (phpMyAdmin usage tutorial 3)

黄舟
Release: 2017-05-12 10:02:50
Original
5782 people have browsed it

Detailed graphic and text explanation of using SQL statements to operate data tables (phpMyAdmin usage tutorial 3)

Click the "SQL" button in the main interface of phpMyAdmin, Open the SQL statement editing area and enter the complete SQL statement to query, add, modify and delete data!

In the previous article " Detailed graphic explanation of data table addition, deletion and modification operations (phpMyAdmin usage tutorial 2)", we introduced how to complete it in the phpMyAdmin graphical management tool For the operation, creation and deletion of data tables, today we will introduce to you how to use SQL statements to operate data tables in the phpMyAdmin interface!

1. Use SQL statements to insert data

Use the insert statement in the SQL statement editing area to insert data into the data table php.cn. Click the "Execute" button to insert a piece of data into the data table. If the submitted SQL statement contains errors, the system will give a warning and prompt the user to modify it, as shown below:

Detailed graphic and text explanation of using SQL statements to operate data tables (phpMyAdmin usage tutorial 3)

If the SQL statement is submitted without errors, click the "Browse" button in the upper left corner to enter the data display page, as shown below:

Detailed graphic and text explanation of using SQL statements to operate data tables (phpMyAdmin usage tutorial 3)

##Tips :

For the convenience of writing, you can use the attribute list on the right to select the column to be operated. Just select the column to be added, double-click its option or click "

2. Use SQL statements to modify data

Use update statements in the SQL editing area to modify data information, such as: id is 1 The user's name is changed to "PHP Chinese Network" and the password is changed to: "654321". See the picture below for details:

Detailed graphic and text explanation of using SQL statements to operate data tables (phpMyAdmin usage tutorial 3)##The above picture makes the page after success. In this way, you can look at the page where the data is displayed.

Before modification:

Detailed graphic and text explanation of using SQL statements to operate data tables (phpMyAdmin usage tutorial 3) After modification:

Detailed graphic and text explanation of using SQL statements to operate data tables (phpMyAdmin usage tutorial 3)It can be seen from the above that the modification has been successful!

3. Use SQL statements to query dataUse the select statement in the SQL statement editing area to retrieve data information with specified conditions, such as: All the information of Xiaoyu 4 is displayed, and the SQL statement is as shown below:

Detailed graphic and text explanation of using SQL statements to operate data tables (phpMyAdmin usage tutorial 3) Click the "Execute" button to achieve the following picture:

Detailed graphic and text explanation of using SQL statements to operate data tables (phpMyAdmin usage tutorial 3)In addition to simple queries on the entire table, you can also perform some complex conditional queries (use where clauses to submit LIKE, ORDERBY, GROUP BY and other conditional query statements) and multi-table queries!

4. Use SQL statements to delete dataUse the delete statement in the SQL statement editing area to retrieve data or all information under specified conditions, such as: Delete the information named baidu.com. The SQL statement is as follows:

Detailed graphic and text explanation of using SQL statements to operate data tables (phpMyAdmin usage tutorial 3)After clicking "Execute", a box will pop up asking you to confirm. After clicking Confirm, it is as follows Picture:

Detailed graphic and text explanation of using SQL statements to operate data tables (phpMyAdmin usage tutorial 3) After clicking Browse in the upper left corner, you will find that the user name baidu.com information has been deleted, as shown below:

Detailed graphic and text explanation of using SQL statements to operate data tables (phpMyAdmin usage tutorial 3)

Note: If there is no where conditional statement after the delete statement, all data in the specified data table will be deleted. Isn’t it very simple to use SQL statements to operate data tables? I believe everyone has learned it. Then we will introduce the management of data records below. Please read "

Manage Data Records" for details. Detailed graphic explanation (phpMyAdmin usage tutorial 4)

》! 【Related Recommendations】

1. Relevant topic recommendations: "

phpMyAdmin Usage Tutorial"

2. Recommended related video courses: "MySQL Free Online Tutorial"

3. Online download of related tools: "phpMyAdmin Tool download"


The above is the detailed content of Detailed graphic and text explanation of using SQL statements to operate data tables (phpMyAdmin usage tutorial 3). 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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!