当前位置:网站首页>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 
边栏推荐
- Jestson nano downloads updated kernel and DTB from TFTP server
- Hudi 集成 Spark 数据分析示例(含代码流程与测试结果)
- Implementing distributed lock with redis
- 【Kotlin学习】高阶函数的控制流——lambda的返回语句和匿名函数
- LeetCode每日一题(1996. The Number of Weak Characters in the Game)
- Nodemcu-esp8266 development (vscode+platformio+arduino framework): Part 1 -- establishment of engineering template -template
- Filter comments to filter out uncommented and default values
- Principles of computer composition - cache, connection mapping, learning experience
- Leetcode daily question (516. long palindromic subsequence)
- Overview of image restoration methods -- paper notes
猜你喜欢

Alibaba cloud notes for the first time

一款开源的Markdown转富文本编辑器的实现原理剖析

Flink学习笔记(九)状态编程

Hudi 集成 Spark 数据分析示例(含代码流程与测试结果)

Please tell me how to set vscode
![[kotlin puzzle] what happens if you overload an arithmetic operator in the kotlin class and declare the operator as an extension function?](/img/fc/5c71e6457b836be04583365edbe08d.png)
[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 (1162. as far from land as possible)

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

Hudi integrated spark data analysis example (including code flow and test results)

Win10安装ELK
随机推荐
Powerdesign reverse wizard such as SQL and generates name and comment
Alibaba cloud notes for the first time
文件系统中的目录与切换操作
LeetCode每日一题(1024. Video Stitching)
About the configuration of vs2008+rade CATIA v5r22
WARNING: You are using pip ; however. Later, upgrade PIP failed, modulenotfounderror: no module named 'pip‘
Utilisation de hudi dans idea
1922. Count Good Numbers
Vscode编辑器右键没有Open In Default Browser选项
unbuntu(debian)下TFTP服务器搭建及测试
Equality judgment of long type
Installation and uninstallation of pyenv
Flink learning notes (IX) status programming
Spark overview
Arduino handles JSON data, arduinojson assistant
LeetCode每日一题(1300. Sum of Mutated Array Closest to Target)
Jestson Nano 从tftp服务器下载更新kernel和dtb
LeetCode每日一题(1996. The Number of Weak Characters in the Game)
PolyWorks script development learning notes (III) -treeview advanced operation
The idea of compiling VBA Encyclopedia