当前位置:网站首页>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 .
边栏推荐
- Attack and defense world ditf Misc
- lora同步字设置
- How does the uni admin basic framework close the creation of super administrator entries?
- Anaconda installs third-party packages
- 414. The third largest digital buckle
- 2022-07-04 mysql的高性能数据库引擎stonedb在centos7.9编译及运行
- 2020 Bioinformatics | GraphDTA: predicting drug target binding affinity with graph neural networks
- C # realizes crystal report binding data and printing 4-bar code
- Aardio - 不声明直接传float数值的方法
- Research and investment strategy report of China's VOCs catalyst industry (2022 Edition)
猜你喜欢
Chapter 3: detailed explanation of class loading process (class life cycle)
Unity3d minigame-unity-webgl-transform插件转换微信小游戏报错To use dlopen, you need to use Emscripten‘s...问题
GPS from getting started to giving up (12), Doppler constant speed
Netxpert xg2 helps you solve the problem of "Cabling installation and maintenance"
2500 common Chinese characters + 130 common Chinese and English characters
(十八)LCD1602实验
[Digital IC hand tearing code] Verilog burr free clock switching circuit | topic | principle | design | simulation
[MySQL] online DDL details
Assembly and Interface Technology Experiment 6 - ADDA conversion experiment, AD acquisition system in interrupt mode
每日一题:力扣:225:用队列实现栈
随机推荐
[线性代数] 1.3 n阶行列式
墨西哥一架飞往美国的客机起飞后遭雷击 随后安全返航
[sdx62] wcn685x will bdwlan Bin and bdwlan Txt mutual conversion operation method
Shortcut keys in the terminal
Netxpert xg2 helps you solve the problem of "Cabling installation and maintenance"
Anaconda installs third-party packages
BarcodeX(ActiveX打印控件) v5.3.0.80 免费版使用
What a new company needs to practice and pay attention to
Aardio - 不声明直接传float数值的方法
[sciter]: encapsulate the notification bar component based on sciter
What are the interface tests? What are the general test points?
LeetCode刷题(十一)——顺序刷题51至55
Unity3d Learning Notes 6 - GPU instantiation (1)
3DMAX assign face map
Kohana database
数据处理技巧(7):MATLAB 读取数字字符串混杂的文本文件txt中的数据
Data storage (1)
NetXpert XG2帮您解决“布线安装与维护”难题
Learn the principle of database kernel from Oracle log parsing
在IPv6中 链路本地地址的优势