当前位置:网站首页>Simple operation of MySQL database

Simple operation of MySQL database

2022-06-13 01:15:00 Roam-G

Log in to the database :mysql -u root -p Just enter the password .

Lists all databases that the current user can view : mysql> SHOW DATABASES;

Create a file called test_db The database of : mysql> CREATE DATABASE test_db;

Use LIKE clause , Check with test_db Exactly matched database : mysql> SHOW DATABASES LIKE 'test_db';

Use LIKE clause , Check that the name contains test The database of : mysql> SHOW DATABASES LIKE '%test%';

example :

1. establish score surface

2. insert data

 

 3. Query all the information in the table

 4. check >=80 Points of

 5. Inquire about Out Good grades in all subjects >=80 Student name of

What you want is to display the name , Other information does not need to be displayed .

Continuous optimization !

The name is repeated

 

Optimize again

Only one qualified name will be displayed .

 

 

原网站

版权声明
本文为[Roam-G]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202280555125871.html