当前位置:网站首页>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 .
边栏推荐
- Task of gradle learning
- Operate BOM objects (key)
- Sightseeing - statistics of the number of shortest paths + state transfer + secondary small paths
- Producer consumer mode (multithreading, use of shared resources)
- Qt6 QML Book/Qt Quick 3D/基础知识
- Thread, thread stack, method stack, the difference of creating thread
- Refer to some books for the distinction between blocking, non blocking and synchronous asynchronous
- 鹏城杯 WEB_WP
- 2022 low voltage electrician examination and low voltage electrician simulation examination question bank
- From the behind the scenes arena of the ice and snow event, see how digital builders can ensure large-scale events
猜你喜欢
![[gd32l233c-start] 5. FLASH read / write - use internal flash to store data](/img/4f/ed8ca2f43ba5a8e5da63eb419aae82.jpg)
[gd32l233c-start] 5. FLASH read / write - use internal flash to store data

Battle drag method 1: moderately optimistic, build self-confidence (1)

Example of peanut shell inner net penetration

In 2021, the global foam protection packaging revenue was about $5286.7 million, and it is expected to reach $6615 million in 2028

Xai+ network security? Brandon University and others' latest "interpretable artificial intelligence in network security applications" overview, 33 page PDF describes its current situation, challenges,

Reinforcement learning - learning notes 1 | basic concepts

In 2021, the global revenue of syphilis rapid detection kits was about US $608.1 million, and it is expected to reach US $712.9 million in 2028

Hcie security Day12: supplement the concept of packet filtering and security policy

Etcd raft Based Consistency assurance

Memory analyzer (MAT)
随机推荐
Summary of common operation and maintenance commands
"Actbert" Baidu & Sydney University of technology proposed actbert to learn the global and local video text representation, which is effective in five video text tasks
Golang type assertion and conversion (and strconv package)
How to modify the network IP addresses of mobile phones and computers?
Measurement fitting based on Halcon learning -- Practice [1]
AST (Abstract Syntax Tree)
2022 melting welding and thermal cutting examination materials and free melting welding and thermal cutting examination questions
Oak-d raspberry pie cloud project [with detailed code]
Get log4net log file in C - get log4net log file in C
Hcie security Day12: supplement the concept of packet filtering and security policy
MySQL 8.0 data backup and recovery
2022 high voltage electrician examination and high voltage electrician reexamination examination
In 2021, the global revenue of syphilis rapid detection kits was about US $608.1 million, and it is expected to reach US $712.9 million in 2028
Preliminary practice of niuke.com (11)
Volley source code analysis
Etcd 基于Raft的一致性保证
2166. Design bit set
The 12th Blue Bridge Cup
What is the maximum number of concurrent TCP connections for a server? 65535?
Assign the CMD command execution result to a variable