Graphical management of database
The database is on the server, and now my computer is already a server (because we followed phpnow), so my computer now has a database.
After phpnow is installed, MySQL is automatically started and running, and there is a MySQL5_pn in the service
Now I want to operate my own database. The back-end operation method of the database is cmd command, but because I have weak knowledge of related commands, I use graphical management software to operate the database
SQLYog is a graphical database management software launched by the American oracle (Oracle Corporation)
After the installation is complete, you need to have a registration code, etc. The pop-up window needs to install the registry first
After the installation is complete, reinstall the exe file again
After installation, link to the database
The test and mysql databases on the left side of the table are built-in. They are built-in after installing phpnow. Don't worry about it for now.
Create database
Create table
After the database is established, many tables can be stored in the database. A database is equivalent to a folder, and a table is equivalent to an Excel file. There can be countless tables in a database
Add data to the corresponding table
There are tables in the database, and there are fields in the table. The fields are the information corresponding to the header, and each row of data is a piece of corresponding information.
At this time, you can view the location of the database in my computer
Operating database sql statement
1. Query
If you want to query the name of the corresponding header
If you want to add the following query conditions, such as age greater than 17 years old
Another example is multi-condition screening, the score is greater than or equal to 80 and less than 100
SELECT * FROM form WHERE score >= 80 && score < 100
2. How to add INSERT INTO
3. Modify UPDATE
The name of the UPDATE table SET The information to be set WHERE Which information comes from
You can also set multiple modifications at the same time
UPDATE form SET score = 90 WHERE score > 70 && score < 90
4. Delete DELETE
DELETE FROM form WHERE NAME = "张三"
Multiple conditions delete
DELETE FROM form WHERE score > 68 && score < 95