当前位置:网站首页>MySQL数据库基本操作-DML
MySQL数据库基本操作-DML
2022-07-06 14:38:00 【黑马程序员官方】
MySQL性能强劲,是目前使用最广泛的数据库之一,以 MySQL为学习原型也方便之后掌握其他数据库,下面就给大家全面讲解下MySQL8.0的新特性,从零基础到高阶一站式学习,结合实际案例让大家有所收获!
▼ MySQL8.0入门-高阶学习笔记:(汇总)
- 第1讲:SQL概述及数据库系统介绍
- 第2讲:MySQL简介、详细安装步骤及使用
- 第3讲:MySQL常用图形管理工具
- 第4讲:MySQL数据库基本操作-DDL
一、基本介绍
DML是指数据操作语言,英文全称是Data Manipulation Language,用来对数据库中表的数据记录进行更新。
关键字:
- 插入insert
- 删除delete
- 更新update

二、数据插入
语法格式
insert into 表 (列名1,列名2,列名3...) values (值1,值2,值3...); //向表中插入某些
insert into 表 values (值1,值2,值3...); //向表中插入所有列例子
insert into student(sid,name,gender,age,birth,address,score)
values(1001,'男',18,'1996-12-23','北京',83.5);
insert into student values(1001,'男',18,'1996-12-23','北京',83.5);数据修改
语法格式
update 表名 set 字段名=值,字段名=值...;
update 表名 set 字段名=值,字段名=值... where 条件;例子
-- 将所有学生的地址修改为重庆
update student set address = '重庆’;
-- 讲id为1004的学生的地址修改为北京
update student set address = '北京' where id = 1004
-- 讲id为1005的学生的地址修改为北京,成绩修成绩修改为100
update student set address = '广州',score=100 where id = 1005数据删除
语法格式
delete from 表名 [where 条件];
truncate table 表名 或者 truncate 表名例子
-- 1.删除sid为1004的学生数据
delete from student where sid = 1004;
-- 2.删除表所有数据
delete from student;
-- 3.清空表数据
truncate table student;
truncate student;注意:delete和truncate原理不同,delete只删除内容,而truncate类似于drop table ,可以理解为是将整个表删除,然后再创建该表;
三、总结
Tableau中,数据源大体可以分为两类,分别是本地数据源(文件)和服务器数据源(服务)。
Tableau中排序分为自动排序和自定义排序,可以按照数据源顺序、字母、字段、手动、嵌套等规则进行排序。
边栏推荐
- Research and investment strategy report of China's VOCs catalyst industry (2022 Edition)
- Seata aggregates at, TCC, Saga and XA transaction modes to create a one-stop distributed transaction solution
- What is the difference between animators and animators- What is the difference between an Animator and an Animation?
- Daily question 1: force deduction: 225: realize stack with queue
- Data storage (1)
- 414. The third largest digital buckle
- [sdx62] wcn685x will bdwlan Bin and bdwlan Txt mutual conversion operation method
- (十八)LCD1602实验
- 0 basic learning C language - digital tube
- C#實現水晶報錶綁定數據並實現打印4-條形碼
猜你喜欢

Chapter 3: detailed explanation of class loading process (class life cycle)

2500 common Chinese characters + 130 common Chinese and English characters

Unity3d Learning Notes 6 - GPU instantiation (1)

墨西哥一架飞往美国的客机起飞后遭雷击 随后安全返航

RESNET rs: Google takes the lead in tuning RESNET, and its performance comprehensively surpasses efficientnet series | 2021 arXiv

Seata aggregates at, TCC, Saga and XA transaction modes to create a one-stop distributed transaction solution
![[leetcode daily clock in] 1020 Number of enclaves](/img/2d/3d12f20c8c73fb28044c01be633c99.jpg)
[leetcode daily clock in] 1020 Number of enclaves

GPS从入门到放弃(十五)、DCB差分码偏差

网络基础入门理解

Management background --1 Create classification
随机推荐
[linear algebra] determinant of order 1.3 n
Assembly and Interface Technology Experiment 6 - ADDA conversion experiment, AD acquisition system in interrupt mode
CCNA-思科网络 EIGRP协议
【sciter Bug篇】多行隐藏
AI enterprise multi cloud storage architecture practice | Shenzhen potential technology sharing
Crawler obtains real estate data
Insert sort and Hill sort
Data storage (1)
Hardware development notes (10): basic process of hardware development, making a USB to RS232 module (9): create ch340g/max232 package library sop-16 and associate principle primitive devices
2022年6月国产数据库大事记-墨天轮
解决项目跨域问题
硬件开发笔记(十): 硬件开发基本流程,制作一个USB转RS232的模块(九):创建CH340G/MAX232封装库sop-16并关联原理图元器件
将MySQL的表数据纯净方式导出
Maximum product of three numbers in question 628 of Li Kou
GPS從入門到放弃(十三)、接收機自主完好性監測(RAIM)
[MySQL] online DDL details
Applet system update prompt, and force the applet to restart and use the new version
qt quick项目offscreen模式下崩溃的问题处理
414. The third largest digital buckle
2500个常用中文字符 + 130常用中英文字符