当前位置:网站首页>Knowledge about SQL - DML
Knowledge about SQL - DML
2022-06-26 04:05:00 【Code Xiaoyou】
DML: Add, delete and modify the data in the table
1. Add data :
* grammar :
insert into Table name ( Name 1, Name 2,..... Name n)value( value 1, value 2,..... value n);
* Be careful :
1. Column name and value should correspond one by one .
2. If the name comes after , No column name defined , The default is to add values to all columns .
insert into Table name value( value 1, value 2,..... value n);
3. Except for the number type , Use quotation marks for other types ( Single and double can ) Lead up
2. Delete data :
* grammar :
delete from Table name [where Conditions ]
* Be careful :
1. If there is no condition , All records in the table will be deleted .
2. If you want to delete all records
1.delete from Table name ;-- It is not recommended to use . The number of records is the number of delete operations
2.truncate table Table name ; -- Recommended . Efficient , Delete the table first , Generating an identical table .
3. Modifying data :
* grammar :
update Table name set Name 1 = value 1, Name 2 = value 2,...[where Conditions ];
* Be careful :
1. If no condition is added , All records in the table will be newly modified .
边栏推荐
- Question brushing record day01
- 【MySQL】 MySQL 导出数据库
- matplotlib折线图,文字显示,win10
- 三元损失英文版
- [Flink] Flink batch mode map side data aggregation normalizedkeysorter
- ipvs之ipvs0网卡
- Lua grammar explanation
- Chrome page recording and playback function
- Threejs专用天空盒素材,五种天空盒素材免费下载
- [LOJ 6718] nine suns' weakened version (cyclic convolution, arbitrary modulus NTT)
猜你喜欢
ABP framework Practice Series (II) - Introduction to domain layer
What should I do if the 51 SCM board cannot find the device in keil
【Flink】Flink Sort-Shuffle写流程简析
第 4 篇:绘制四边形
chrome页面录制,重放功能
Getting started with flask
matplotlib多条折线图,点散图
Machine learning notes - trend components of time series
An error occurred using the connection to database 'on server' 10.28.253.2‘
After four years of outsourcing, people are directly abandoned...
随机推荐
The style of the mall can also change a lot. DIY can learn about it
ABP framework Practice Series (I) - Introduction to persistence layer
In 2022, what professional competitions can college students majoring in automation, electrical engineering and automation participate in?
Lua语法讲解
在出海获客这件事上,数字广告投放之外,广告主还能怎么玩儿?
力扣 515. 在每个树行中找最大值
2020 summary: industrial software development under Internet thinking
763. dividing alphabetic intervals
使用Jsoup提取接口中的图片
刷题记录Day01
[Flink] Flink source code analysis - creation of jobgraph in batch mode
Contains an object field at offset position
外包干了四年,人直接废了。。。
MySQL's built-in performance testing tool, mysqlslap, performs stress testing
线程同步之互斥量(互斥锁)
Spark - 一文搞懂 parquet
asp. Net web page, ASP connects to the database, and uses asp:panel and asp:dropdownlist controls
三元损失英文版
Analysis of camera memory memory leakage (II)
How does virtual box virtual machine software accelerate the network speed in the virtual system?