当前位置:网站首页>Mysql database ----- common commands of database (based on database)
Mysql database ----- common commands of database (based on database)
2022-07-03 20:56:00 【Bloom_ 001】
------------------------------------------------- My database version 8.0.28-------------------------------------------------
One view the database :show databases;

These four databases are MySQL The system provides .
- information_schema Some database object information in the main storage system . For example, user table information , Column information, etc .
- mysql It mainly stores the user authority information of the system .
- performance_schema It mainly stores the performance parameters of the database server .
- sys Metadata information of the main storage system .
Two Create database
create database + Database name ;( Database naming specification reference : Database naming rules -- Universal _HouYing-CSDN Blog _ Database naming rules )
create database Test01;

Obviously, create a database test01 success (SQL Statements are case insensitive ).
* Security version creates database ( Use when you don't know whether the database name is duplicate ).
* create database if not exists test;

* 1 warning representative test Already exist , Not created again .
3、 ... and Delete database
drop database + Database name
drop database test;

Looking at the database again, I found test The database was deleted .
* If you delete a nonexistent database, an error will be reported
* Here is a safe way to delete the database ( See the text to know the meaning )
* drop database if exists test;
Four Use specific databases
use + Database name
use test;

You can see The database has been switched .
Focus on Me, Continuous updating MySQl Knowledge of databases .
边栏推荐
- Producer consumer mode (multithreading, use of shared resources)
- Test access criteria
- Gauss elimination solves linear equations (floating-point Gauss elimination template)
- Operate BOM objects (key)
- 阻塞非阻塞和同步异步的区分 参考一些书籍
- 6006. Take out the minimum number of magic beans
- CesiumJS 2022^ 源码解读[7] - 3DTiles 的请求、加载处理流程解析
- Read the root directory of the folder, write txt and generate random samples
- Transformation between yaml, Jason and Dict
- Cap and base theory
猜你喜欢

The "boss management manual" that is wildly spread all over the network (turn)

APEC industry +: father of the king of the ox mill, industrial Internet "king of the ox mill anti-wear faction" Valentine's Day greetings | Asia Pacific Economic media | ChinaBrand

@Scenario of transactional annotation invalidation

TLS environment construction and plaintext analysis

From the behind the scenes arena of the ice and snow event, see how digital builders can ensure large-scale events

LabVIEW training

String and+

《ActBERT》百度&悉尼科技大学提出ActBERT,学习全局局部视频文本表示,在五个视频-文本任务中有效!...

19、 MySQL -- SQL statements and queries

内存分析器 (MAT)
随机推荐
Kubernetes abnormal communication network fault solution ideas
Day6 merge two ordered arrays
Machine learning support vector machine SVM
Discussion Net legacy application transformation
你真的知道自己多大了吗?
JS three families
Pytorch sets the weight and bias of the model to zero
Transformation between yaml, Jason and Dict
Print linked list from end to end
How to set the system volume programmatically- How to programmatically set the system volume?
电子科技大学|强化学习中有效利用的聚类经验回放
Example of peanut shell inner net penetration
JMeter plug-in installation
Talk about daily newspaper design - how to write a daily newspaper and what is the use of a daily newspaper?
内存分析器 (MAT)
In 2021, the global general crop protection revenue was about $52750 million, and it is expected to reach $64730 million in 2028
@Transactional注解失效的场景
LabVIEW training
Basic knowledge of dictionaries and collections
Use nodejs+express+mongodb to complete the data persistence project (with modified source code)