当前位置:网站首页>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 备份数据库!!!!这个很重要
边栏推荐
- Static routing default routing VLAN experiment
- mgre的全连和星型拓扑实验
- The basic configuration of static routing (planning of IP address and configuration of static routing) realizes the accessibility of the whole network.
- IS指标复现 文本生成图像IS分数定量实验全流程复现 Inception Score定量评价实验踩坑避坑流程
- [FPGA tutorial case 29] the second DDS direct digital frequency synthesizer based on FPGA - Verilog development
- Experiment of total connection and star topology of mGRE
- 静态综合实验(静态路由、环回接口、缺省路由、空接口、浮动静态的综合练习)
- Autojs learning - realize image cutting
- [translation] explicit and implicit batch in tensorrt
- TIM输出比较——PWM
猜你喜欢

Static comprehensive experiment (comprehensive exercise of static route, loopback interface, default route, empty interface, floating static)

VLAN原理简述、具体实验配置

7.7 sheen Xiyin written test

OSPF static experiment

OSPF在MGRE环境下配置及LSA的优化---减少LSA更新量(汇总、特殊区域)

静态路由缺省路由vlan实验

HCIA(网络初级综合实验练习)
![[详解C语言]一文带你玩转循环结构(for_while_do-while)](/img/d9/75053297873a5b5458514e7f557cdc.png)
[详解C语言]一文带你玩转循环结构(for_while_do-while)

静态路由基础配置(IP地址的规划、静态路由的配置),实现全网可达。
![[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
随机推荐
Three methods that can effectively fuse text and image information -- feature stitching, cross modal attention, conditional batch normalization
Dynamic routing rip protocol experiment
Freytek central computing platform 360 degree sensing system solves the challenges behind NOA mass production
First knowledge of Web Design
JS -- first understand the naming rules and data types of JS and variables
动态路由ofps协议配置
6.30滴滴面经(一面+二面)
Nat网络地址转换实验
6.28大华笔试
[translation] explicit and implicit batch in tensorrt
FID指标复现踩坑避坑 文本生成图像FID定量实验全流程复现(Fréchet Inception Distance )定量评价实验踩坑避坑流程
Text to image paper intensive reading rat-gan: recursive affine transformation for text to image synthesis
OSPF的重发布及路由策略
OGeek Meetup第一期,携手CubeFS火热来袭
HCIA基础知识(1)
解决方案:炼丹师养成计划 Pytorch+DeepLearning遇见的各种报错与踩坑避坑记录(二)
Solution: various error reports and pit stepping and pit avoidance records encountered in the alchemist cultivation plan pytoch+deeplearning (I)
STM32入门教程第一讲
静态路由基础配置(IP地址的规划、静态路由的配置),实现全网可达。
7.7 SHEIN希音笔试