当前位置:网站首页>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
边栏推荐
- 文件系统中的目录与切换操作
- Leetcode daily question (2232. minimize result by addressing parents to expression)
- IDEA 中使用 Hudi
- LeetCode每日一题(2115. Find All Possible Recipes from Given Supplies)
- Arduino handles JSON data, arduinojson assistant
- Construction and test of TFTP server under unbuntu (Debian)
- 1922. Count Good Numbers
- Spark 概述
- LeetCode每日一题(968. Binary Tree Cameras)
- The idea of compiling VBA Encyclopedia
猜你喜欢
Solve editor MD uploads pictures and cannot get the picture address
一款开源的Markdown转富文本编辑器的实现原理剖析
LeetCode每日一题(1162. As Far from Land as Possible)
What do software test engineers do? Pass the technology to test whether there are loopholes in the software program
PolyWorks script development learning notes (I) - script development environment
解决Editor.md上传图片获取不到图片地址问题
Django operates Excel files through openpyxl to import data into the database in batches.
Hudi 数据管理和存储概述
Spark 结构化流写入Hudi 实践
Temper cattle ranking problem
随机推荐
QT sub window is blocked, and the main window cannot be clicked after the sub window pops up
Vscode Arduino installation Library
Spark overview
LeetCode每日一题(1996. The Number of Weak Characters in the Game)
Spark 集群安装与部署
Leetcode daily question (985. sum of even numbers after queries)
1922. Count Good Numbers
LeetCode每日一题(985. Sum of Even Numbers After Queries)
About the configuration of vs2008+rade CATIA v5r22
ERROR: certificate common name “*.” doesn’t match requested ho
LeetCode每日一题(968. Binary Tree Cameras)
The idea of compiling VBA Encyclopedia
Crawler career from scratch (IV): climb the bullet curtain of station B through API
[CSDN]C1训练题解析_第三部分_JS基础
[CSDN] C1 training problem analysis_ Part III_ JS Foundation
Windows安装Redis详细步骤
软件测试工程师是做什么的 通过技术测试软件程序中是否有漏洞
PolyWorks script development learning notes (III) -treeview advanced operation
Usage of pandas to obtain MySQL data
基于opencv实现桌面图标识别