当前位置:网站首页>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 
边栏推荐
- Make the most basic root file system of Jetson nano and mount NFS file system on the server
- IDEA 中使用 Hudi
- Banner - Summary of closed group meeting
- [CSDN] C1 training problem analysis_ Part III_ JS Foundation
- 解决Editor.md上传图片获取不到图片地址问题
- Database execution error: SQL_ mode only_ full_ group_ by:
- [CSDN]C1训练题解析_第三部分_JS基础
- Win10 quick screenshot
- [solution to the new version of Flink without bat startup file]
- The server denied password root remote connection access
猜你喜欢

Construction of simple database learning environment

Detailed steps of windows installation redis
![Uncle Wang's blog directory [constantly updating]](/img/91/72cdea3eb3f61315595330d2c9016d.png)
Uncle Wang's blog directory [constantly updating]

Using Hudi in idea

PolyWorks script development learning notes (4) - data import and alignment using file import
![[set theory] order relation (eight special elements in partial order relation | ① maximum element | ② minimum element | ③ maximum element | ④ minimum element | ⑤ upper bound | ⑥ lower bound | ⑦ minimu](/img/57/b413a93a456a1872fc19aa825c937a.jpg)
[set theory] order relation (eight special elements in partial order relation | ① maximum element | ② minimum element | ③ maximum element | ④ minimum element | ⑤ upper bound | ⑥ lower bound | ⑦ minimu

Spark overview

全球KYC服务商ADVANCE.AI 活体检测产品通过ISO国际安全认证 产品能力再上一新台阶

Temper cattle ranking problem

Utilisation de hudi dans idea
随机推荐
Leetcode daily question (1162. as far from land as possible)
PolyWorks script development learning notes (4) - data import and alignment using file import
Hudi 快速体验使用(含操作详细步骤及截图)
Leetcode daily question (931. minimum falling path sum)
Common formulas of probability theory
[kotlin puzzle] what happens if you overload an arithmetic operator in the kotlin class and declare the operator as an extension function?
Leetcode daily question (1362. closest divisors)
Modify idea code
Spark 结构化流写入Hudi 实践
Quickly use markdown to edit articles
Analysis of the implementation principle of an open source markdown to rich text editor
Jetson Nano 自定义启动图标kernel Logo cboot logo
[set theory] order relation (eight special elements in partial order relation | ① maximum element | ② minimum element | ③ maximum element | ④ minimum element | ⑤ upper bound | ⑥ lower bound | ⑦ minimu
Directory and switching operation in file system
Flask+supervisor installation realizes background process resident
LeetCode每日一题(2090. K Radius Subarray Averages)
Overview of image restoration methods -- paper notes
[solution to the new version of Flink without bat startup file]
[kotlin learning] control flow of higher-order functions -- lambda return statements and anonymous functions
Crawler career from scratch (I): crawl the photos of my little sister ① (the website has been disabled)