当前位置:网站首页>MySQL data manipulation language DML common commands
MySQL data manipulation language DML common commands
2022-07-03 09:36:00 【chenhyc】
【1】 Query all data in the table :select * from The name of the table ;
【2】 Add the data in the table 、 Delete 、 Change the operation :
2.1 increase insert into Table name ( Name 1, Name 2……) values( The column value 1, The column value 2……)
perhaps values Followed by a semicolon without parentheses and terminators , Input after line break :
2.2 Add data in bulk :insert into Table name ( Column 1, Column 2……) values( The column value 1, The column value 2……),( The column value 3, The column value 4),……
2.3 Update the content ( All modified ):update Table name set Columns to be modified = The column value 
2.4 Update data ( Specify modification ):update Table name set Column = The column value where Column = The column value
remarks :where Indicates the selection condition , Specify which column values to modify 
2.5 Update data ( Multiple modifications ):update Table name set Column 1= The column value 1, Column 2= The column value 2 where Column = The column value ;
2.6 Update data ( Column value plus ):update Table name set The column value = The column value +n while Column = The column value ;
【3】 Update the database login password :
Mode one :update user set authentication_string=password(‘ New password ’) where user=‘root’;
remarks : The database password is stored in the database mysql Medium use In the table , You can query through visualization software , Or command line query 
Password storage location :authentication_string
perform :update user set authentication_string=password(‘ New password ’) where user=‘root’;
Perform refresh mysql System authority related table of , It will take effect :flush privileges;
Sign out and log back in ;
Mode two : Environment variable set ( Not set , Need to go to mysql Of bin Catalog ), Execute in exit state : mysqladmin -u root password New password
remarks : This way, , You need to remember the original password , At the same time, the end cannot be semicolon 
边栏推荐
- PolyWorks script development learning notes (II) -treeview basic operations
- Jetson Nano 自定义启动图标kernel Logo cboot logo
- Crawler career from scratch (II): crawl the photos of my little sister ② (the website has been disabled)
- Leetcode daily question (516. long palindromic subsequence)
- 307. Range Sum Query - Mutable
- Esp32 at command does not respond
- Win10 install elk
- IDEA 中使用 Hudi
- Derivation of Fourier transform
- Matlab dichotomy to find the optimal solution
猜你喜欢

LeetCode每日一题(1162. As Far from Land as Possible)

【Kotlin学习】高阶函数的控制流——lambda的返回语句和匿名函数

数字身份验证服务商ADVANCE.AI顺利加入深跨协 推进跨境电商行业可持续性发展
![[CSDN] C1 training problem analysis_ Part III_ JS Foundation](/img/b2/68d53ad09688f7fc922ac65e104f15.png)
[CSDN] C1 training problem analysis_ Part III_ JS Foundation

Spark 集群安装与部署

【Kotlin疑惑】在Kotlin类中重载一个算术运算符,并把该运算符声明为扩展函数会发生什么?

PolyWorks script development learning notes (I) - script development environment

Crawler career from scratch (I): crawl the photos of my little sister ① (the website has been disabled)

What do software test engineers do? Pass the technology to test whether there are loopholes in the software program
![[kotlin learning] classes, objects and interfaces - classes with non default construction methods or attributes, data classes and class delegates, object keywords](/img/ee/d982fd9e1f2283e09ad1a81d0b61b5.png)
[kotlin learning] classes, objects and interfaces - classes with non default construction methods or attributes, data classes and class delegates, object keywords
随机推荐
[set theory] order relation (chain | anti chain | chain and anti chain example | chain and anti chain theorem | chain and anti chain inference | good order relation)
Crawler career from scratch (3): crawl the photos of my little sister ③ (the website has been disabled)
Apply for domain name binding IP to open port 80 record
Solve editor MD uploads pictures and cannot get the picture address
Logstash+jdbc data synchronization +head display problems
QT sub window is blocked, and the main window cannot be clicked after the sub window pops up
[kotlin learning] classes, objects and interfaces - define class inheritance structure
Basic knowledge of database design
Construction and test of TFTP server under unbuntu (Debian)
软件测试工程师是做什么的 通过技术测试软件程序中是否有漏洞
Hudi data management and storage overview
PolyWorks script development learning notes (4) - data import and alignment using file import
The rise and fall of mobile phones in my perspective these 10 years
Serializer rewrite: update and create methods
Principles of computer composition - cache, connection mapping, learning experience
Long类型的相等判断
LeetCode每日一题(968. Binary Tree Cameras)
The idea of compiling VBA Encyclopedia
Equality judgment of long type
专利查询网站