当前位置:网站首页>mysql数据库的基本操作(一)-——基于数据库
mysql数据库的基本操作(一)-——基于数据库
2022-07-27 21:59:00 【*黑心萝卜三条杠*】
1.创建数据库
create database +数据库名称;
例如:我需要创建test1数据库,具体操作与结果如下图

2.显示数据库
(1)显示全部数据库
show databases;例如:我需要显示全部的数据库,具体操作及显示结果如下

(注意:information_schema、mysql、performanse_schema、sys这三个库是系统自带的,test1、db1这两个库是我创建的库。)
(2)显示指定的数据库
show create database +库名;例如:显示特定的test1库,具体操作及结果如下

3.选择数据库
use +库名;例如:我需要选择的库是test1,那么具体操作及结果如下

4.删除数据库
drop database +库名;例如:我需要删除的数据库是db1,那么实际操作及结果如下

5.更改数据库名字
alter database +名字+选项;//由于此命令只能在老版本上用,因此我在此不做展示边栏推荐
- ADB path cannot contain 2 spaces remote could n't create file: is a directory
- JS 事件传播 捕获阶段 冒泡阶段 onclick addEventListener
- MATLAB | MATLAB地形生成:矩形迭代法 · 傅里叶逆变换法 · 分形柏林噪声法
- 49 times faster, NVIDIA releases quantum hybrid programming platform qoda
- Intensive reading of deep learning papers [gan]: multi-purpose image restoration and processing using depth generation priors
- Impulse attends the 2022 Forum on safe circulation of data elements Online - a special session in the field of government affairs, and helps the construction and innovative development of big data for
- 北欧岗位制博士申请有多难?
- Matlab | matlab terrain generation: rectangular iteration method, inverse Fourier transform method, fractal Berlin noise method
- 学yolo需要什么基础?怎么学YOLO?
- Yongzhou plant cell laboratory construction layout plan
猜你喜欢

【Leetcode】547.省份数量(中等)

mysql分表之后怎么平滑上线?

Analysis and solution of errors in symbols uploading when baget manages packages

AI briefing how to use loss surfaces a model integration

HarmonyOS 3纯净模式可限制华为应用市场检出的风险应用获取个人数据

学yolo需要什么基础?怎么学YOLO?

程序员工作中的理性与感性活动及所需的技能素养

Intel joins hands with hanshuo and Microsoft to release the "Ai + retail" trick!

What are the namespaces and function overloads of + and @ in front of MATLAB folder

MATLAB | 那些你不得不知道的MATLAB小技巧(二)
随机推荐
【打新必读】魅视科技估值分析,分布式视听产品及解决方案
MFC提示this application has requested the runtime to terminate it in an unusual way editbox框已经删了还在使用
[21 day learning challenge] classmate K invites you to participate in the in-depth learning seminar
Implement Gobang game with C language
Matlab | those matlab tips you have to know (3)
Read one line of string input each time (to be supplemented)
30余年的元宇宙,为我们带来了什么?
Introduction to thesis writing | how to write an academic research paper
҈直҈播҈预҈告҈ |҈ 炎热盛夏,与Nono一起跨越高温“烤”验吧!
Is it amazing to extract text from pictures? Try three steps to realize OCR!
leetcode 452. Minimum Number of Arrows to Burst Balloons 用最少数量的箭引爆气球(中等)
HarmonyOS 3纯净模式可限制华为应用市场检出的风险应用获取个人数据
7月第3周榜单丨飞瓜数据B站UP主排行榜发布!
A few lines of code can easily realize the real-time reasoning of paddleocr. Come and get!
[C language] string reverse order (recursive implementation)
What are the namespaces and function overloads of + and @ in front of MATLAB folder
Jin's thinking
Matlab | matlab terrain generation: rectangular iteration method, inverse Fourier transform method, fractal Berlin noise method
Remote monitoring of pump station
【Leetcode】547.省份数量(中等)