当前位置:网站首页>Mysql database basic operations DML
Mysql database basic operations DML
2022-07-06 22:24:00 【Dark horse programmer official】
MySQL Strong performance , It is one of the most widely used databases at present , With MySQL For learning the prototype, it is also convenient to master other databases later , Now let's give you Give a comprehensive explanation MySQL8.0 New features , From zero foundation to high-level one-stop learning , Combined with actual cases, we can gain something !
▼ MySQL8.0 introduction - Advanced learning notes :( Summary )
- The first 1 speak :SQL Overview and database system introduction
- The first 2 speak :MySQL brief introduction 、 Detailed installation steps and use
- The first 3 speak :MySQL Common graphics management tools
- The first 4 speak :MySQL Basic operation of database -DDL
One 、 Basic introduction
DML It refers to the data operation language , The full English name is Data Manipulation Language, Used to update the data records of tables in the database .
keyword :
- Insert insert
- Delete delete
- to update update
Two 、 Insert data into
Grammar format
insert into surface ( Name 1, Name 2, Name 3...) values ( value 1, value 2, value 3...); // Insert some... Into the table
insert into surface values ( value 1, value 2, value 3...); // Insert all columns... Into the table
Example
insert into student(sid,name,gender,age,birth,address,score)
values(1001,' male ',18,'1996-12-23',' Beijing ',83.5);
insert into student values(1001,' male ',18,'1996-12-23',' Beijing ',83.5);
Data modification
Grammar format
update Table name set Field name = value , Field name = value ...;
update Table name set Field name = value , Field name = value ... where Conditions ;
Example
-- Change the address of all students to Chongqing
update student set address = ' Chongqing ’;
-- speak id by 1004 The address of the student is changed to Beijing
update student set address = ' Beijing ' where id = 1004
-- speak id by 1005 The address of the student is changed to Beijing , The grade is revised to 100
update student set address = ' Guangzhou ',score=100 where id = 1005
Data deletion
Grammar format
delete from Table name [where Conditions ];
truncate table Table name perhaps truncate Table name
Example
-- 1. Delete sid by 1004 Student data for
delete from student where sid = 1004;
-- 2. Delete all data from the table
delete from student;
-- 3. Clear table data
truncate table student;
truncate student;
Be careful :delete and truncate The principle is different ,delete Only delete content , and truncate Be similar to drop table , It can be understood as deleting the whole table , Then create the table ;
3、 ... and 、 summary
Tableau in , Data sources can be roughly divided into two categories , They are local data sources ( file ) And server data sources ( service ).
Tableau Sorting is divided into automatic sorting and custom sorting , It can be in the order of data sources 、 Letter 、 Field 、 Manual 、 Sort by nesting rules .
边栏推荐
- [sdx62] wcn685x will bdwlan Bin and bdwlan Txt mutual conversion operation method
- Management background --4, delete classification
- 嵌入式常用计算神器EXCEL,欢迎各位推荐技巧,以保持文档持续更新,为其他人提供便利
- UNI-Admin基础框架怎么关闭创建超级管理员入口?
- Chapter 3: detailed explanation of class loading process (class life cycle)
- GPS from getting started to giving up (XI), differential GPS
- Management background --2 Classification list
- Xiaoman network model & http1-http2 & browser cache
- Build op-tee development environment based on qemuv8
- Four data streams of grpc
猜你喜欢
2020 Bioinformatics | GraphDTA: predicting drug target binding affinity with graph neural networks
Web APIs DOM 时间对象
C#實現水晶報錶綁定數據並實現打印4-條形碼
硬件開發筆記(十): 硬件開發基本流程,制作一個USB轉RS232的模塊(九):創建CH340G/MAX232封裝庫sop-16並關聯原理圖元器件
Powerful domestic API management tool
Leetcode question brushing (XI) -- sequential questions brushing 51 to 55
The nearest common ancestor of binary (search) tree ●●
Management background --1 Create classification
硬件开发笔记(十): 硬件开发基本流程,制作一个USB转RS232的模块(九):创建CH340G/MAX232封装库sop-16并关联原理图元器件
[leetcode daily clock in] 1020 Number of enclaves
随机推荐
i.mx6ull搭建boa服务器详解及其中遇到的一些问题
Force deduction question 500, keyboard line, JS implementation
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
A Mexican airliner bound for the United States was struck by lightning after taking off and then returned safely
Notes de développement du matériel (10): flux de base du développement du matériel, fabrication d'un module USB à RS232 (9): création de la Bibliothèque d'emballage ch340g / max232 SOP - 16 et Associa
软考高级(信息系统项目管理师)高频考点:项目质量管理
每日一题:力扣:225:用队列实现栈
The SQL response is slow. What are your troubleshooting ideas?
二叉(搜索)树的最近公共祖先 ●●
C # réalise la liaison des données du rapport Crystal et l'impression du Code à barres 4
Research and investment strategy report of China's VOCs catalyst industry (2022 Edition)
重磅新闻 | Softing FG-200获得中国3C防爆认证 为客户现场测试提供安全保障
UNI-Admin基础框架怎么关闭创建超级管理员入口?
SQL Server生成自增序号
图像的spatial domain 和 frequency domain 图像压缩
What a new company needs to practice and pay attention to
AI enterprise multi cloud storage architecture practice | Shenzhen potential technology sharing
二分图判定
ResNet-RS:谷歌领衔调优ResNet,性能全面超越EfficientNet系列 | 2021 arxiv
自制J-Flash烧录工具——Qt调用jlinkARM.dll方式