当前位置:网站首页>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
边栏推荐
- The server denied password root remote connection access
- 解决Editor.md上传图片获取不到图片地址问题
- Starting from 0, use pnpm to build a demo managed by monorepo
- Spark cluster installation and deployment
- CATIA automation object architecture - detailed explanation of application objects (I) document/settingcontrollers
- Spark 结构化流写入Hudi 实践
- Matlab dichotomy to find the optimal solution
- [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)
- Overview of image restoration methods -- paper notes
- Flink学习笔记(十一)Table API 和 SQL
猜你喜欢
图像修复方法研究综述----论文笔记
Flink学习笔记(十一)Table API 和 SQL
Crawler career from scratch (I): crawl the photos of my little sister ① (the website has been disabled)
[kotlin puzzle] what happens if you overload an arithmetic operator in the kotlin class and declare the operator as an extension function?
Apply for domain name binding IP to open port 80 record
LeetCode每日一题(1162. As Far from Land as Possible)
Using Hudi in idea
全球KYC服务商ADVANCE.AI 活体检测产品通过ISO国际安全认证 产品能力再上一新台阶
LeetCode每日一题(931. Minimum Falling Path Sum)
Hudi data management and storage overview
随机推荐
LeetCode每日一题(2109. Adding Spaces to a String)
The rise and fall of mobile phones in my perspective these 10 years
307. Range Sum Query - Mutable
基于opencv实现桌面图标识别
解决Editor.md上传图片获取不到图片地址问题
The server denied password root remote connection access
Nodemcu-esp8266 development (vscode+platformio+arduino framework): Part 1 -- establishment of engineering template -template
Win10安装ELK
Filter comments to filter out uncommented and default values
LeetCode每日一题(1996. The Number of Weak Characters in the Game)
ERROR: certificate common name “*.” doesn’t match requested ho
LeetCode每日一题(2212. Maximum Points in an Archery Competition)
[CSDN]C1训练题解析_第三部分_JS基础
Solve the problem of disordered code in vscode development, output Chinese and open source code
Crawler career from scratch (II): crawl the photos of my little sister ② (the website has been disabled)
Learning C language from scratch -- installation and configuration of 01 MinGW
【Kotlin学习】高阶函数的控制流——lambda的返回语句和匿名函数
Leetcode daily question (2109. adding spaces to a string)
Call the contents of Excel cells opened at the same time - button line feed
Trial of the combination of RDS and crawler