当前位置:网站首页>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 
边栏推荐
- Find all possible recipes from given supplies
- Go language - IO project
- Equality judgment of long type
- Overview of image restoration methods -- paper notes
- Solve the problem of disordered code in vscode development, output Chinese and open source code
- 307. Range Sum Query - Mutable
- Send mail using WP mail SMTP plug-in
- Serializer rewrite: update and create methods
- [kotlin learning] control flow of higher-order functions -- lambda return statements and anonymous functions
- LeetCode每日一题(1024. Video Stitching)
猜你喜欢

Solve editor MD uploads pictures and cannot get the picture address

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

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

Hudi 快速体验使用(含操作详细步骤及截图)

The rise and fall of mobile phones in my perspective these 10 years

Crawler career from scratch (IV): climb the bullet curtain of station B through API

Hudi 数据管理和存储概述

Spark 集群安装与部署

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

CATIA automation object architecture - detailed explanation of application objects (I) document/settingcontrollers
随机推荐
Solve the problem of disordered code in vscode development, output Chinese and open source code
[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)
[CSDN] C1 training problem analysis_ Part III_ JS Foundation
Jestson nano custom root file system creation (supports the smallest root file system of NVIDIA Graphics Library)
Arduino handles JSON data, arduinojson assistant
Flink学习笔记(十一)Table API 和 SQL
Alibaba cloud notes for the first time
Analysis of the implementation principle of an open source markdown to rich text editor
Flink learning notes (VIII) multi stream conversion
Hudi学习笔记(三) 核心概念剖析
1300. sum of varied array closed to target
Flink学习笔记(十)Flink容错机制
Flink-CDC实践(含实操步骤与截图)
图像修复方法研究综述----论文笔记
Jestson Nano自定义根文件系统创建(支持NVIDIA图形库的最小根文件系统)
Nodemcu-esp8266 development (vscode+platformio+arduino framework): Part 1 -- establishment of engineering template -template
Notes on numerical analysis (II): numerical solution of linear equations
CATIA automation object architecture - detailed explanation of application objects (I) document/settingcontrollers
[set theory] order relation (eight special elements in partial order relation | ① maximum element | ② minimum element | ③ maximum element | ④ minimum element | ⑤ upper bound | ⑥ lower bound | ⑦ minimu
Usage of pandas to obtain MySQL data