当前位置:网站首页>MySQL课程1.简单命令行--简单记录 欢迎补充纠错
MySQL课程1.简单命令行--简单记录 欢迎补充纠错
2022-07-26 22:49:00 【人比代码跑得快】
首先在mysql文件夹下的bin路径上打cmd,进入命令窗!我安装在E盘,默认都是C盘吧。

都是上课内容,我自己简单记录一下以后也好找。
mysql -u root -p 登录数据库
show databases; 展示MySQL服务内的所有的库
create database 库名; 创建一个数据库
drop database 库名; 删除一个数据库
use 库名; 使用这个库
desc 表名; 查看这个表的结构
alter table 表名 add 行名 varchar(20) not null; 插入一个列
alter table 表名 change 行名 newAlter text; 改列类型
show tables; 查看全部的表
alter table 原表名 rename 新表名; 修改表名
drop table users; 删除表
insert into 表名 values(xx,xx,xx); 插入了一条数据
delete from 表名 where id=12; 删除一条数据
select * from 表名; 查看这个表的全部数据
update 表名 set introduce ='要修改的内容' where id=10; 修改了一条数据
!!!!!!!update语句没有where,絕對不执行!!!!!!!!!!!
檢查!!!!!!!!!!!检查检查!!!!检查!!!!!!
exit 退出数据库
mysqldump -u 用户名 -p 数据库名 > 盘符:\路径\文件名.sql 备份数据库!!!!这个很重要
边栏推荐
- OSPF static experiment
- 动态路由rip协议实验
- 2022最新抖音直播监控(二)直播间流媒体下载
- 【volatile原理】volatile原理
- 7.16 written examination of Duoyi network
- 广域网技术实验
- HCIA静态路由基础模拟实验
- 最新C语言入门与进阶 -史上最全最详细的C语言教程!! 第一节-总览C语言概括
- [reprint] GPU compute capability table
- Solution: various error reports and pit stepping and pit avoidance records encountered in the alchemist cultivation plan pytoch+deeplearning (I)
猜你喜欢
![C language implementation of the small game [sanziqi] Notes detailed logic clear, come and have a look!!](/img/b9/ade9a808a3f6d24cd9825dc9b010c1.png)
C language implementation of the small game [sanziqi] Notes detailed logic clear, come and have a look!!

解决方案:炼丹师养成计划 Pytorch+DeepLearning遇见的各种报错与踩坑避坑记录(二)

IS指标复现 文本生成图像IS分数定量实验全流程复现 Inception Score定量评价实验踩坑避坑流程

Dynamic routing ofps protocol configuration

Unity Huatuo hot update environment installation and sample project
![[详解C语言]一文带你玩转函数](/img/44/53cdac9b9cf0d3f77e5da05956c3dc.png)
[详解C语言]一文带你玩转函数

mgre的全连和星型拓扑实验

C语言实现小游戏【三子棋】注释详细 逻辑清晰 快来看看吧!!

高度塌陷解决方法
![[FPGA tutorial case 28] one of DDS direct digital frequency synthesizers based on FPGA -- principle introduction](/img/bf/ce4bc33d2a0fc7fe57105e20fbafcf.png)
[FPGA tutorial case 28] one of DDS direct digital frequency synthesizers based on FPGA -- principle introduction
随机推荐
HCIA(网络初级综合实验练习)
2022最新直播监控24小时监控(三)直播间弹幕解析
[explain C language in detail] this article takes you to know C language and makes you impressed
[paddleseg source code reading] paddleseg export static graph export Trace in py file
Brief introduction of VLAN principle and specific experimental configuration
TIM输出比较——PWM
The basic configuration of static routing (planning of IP address and configuration of static routing) realizes the accessibility of the whole network.
Ospf基础配置应用( 综合实验: 干涉选举 缺省路由 区域汇总 认证--接口认证)
Experiment of total connection and star topology of mGRE
OSPF protocol overview and basic concepts
Freytek central computing platform 360 degree sensing system solves the challenges behind NOA mass production
机械硬盘选购指南——从选购经历谈起
Autojs learning - realize image cutting
[详解C语言]一文带你玩转选择(分支)结构
C language implementation of the small game [sanziqi] Notes detailed logic clear, come and have a look!!
【volatile原理】volatile原理
初识C语言(2)
关于在VS2022或者高级版本运行环境下遇到fopen,strerror等不安全的问题
静态路由综合实验
OSPF在MGRE环境下配置及LSA的优化---减少LSA更新量(汇总、特殊区域)