当前位置:网站首页>When I forget how to write SQL, I
When I forget how to write SQL, I
2022-07-04 10:21:00 【Java full stack preacher】
When I forget SQL How to write , I ……
What I used to be , Open the computer Baidu , Open the notes for a round of inquiry , I didn't find what I wanted most . Learn how to learn MySQL
Don't panic , No big problem
It turned out MySQL It comes with help documents .
So I had a meal to operate :win+R >> mysql -uroot -p >> Enter :?
result : The face is as green as the words in the picture , I can't understand what chicken intestines are written
I can't understand. It's OK , Teach now
Explain through chestnuts
For example, modify the table field name , I remember this order , yes , yes alter forehead , I just remember it was alter 了
No big problem , Do you remember alter
First step : Ask next alter,alter How to use it?
? alter
The second step : Ask again alter table
? alter table
So this version (5.7.27) I won't support it …… So you use rename There is no way to modify the field name .
When I change mysql 8.0.27 after , See support rename Grammar is like this , More than a bar ……
The third step : Merge grammar
Summon the snake skin monster
alter table tbl_name rename column old_col_name to new_col_name;
Test it , See if the fit succeeds
Hey 、 As if , I got hold of MySQL help file
In case 、 I forgot how to spell alter 了 , What do I do ?
Ask no questions ??? Slightly , Look at the picture and see how to ask
Data Definition (DDL Data definition statement )
Data Manipulation (DML Data operation statement )
Data Types ( data type )
See here is not an instant understand it ,DDL and DML All found .
pursuant to an inquiry , You see , This is back to the first step before
Only this and nothing more , You have mastered how to catch fish at work . Teaching a man to fish is better than giving him a fish !!
Pay attention to the official account, learn more about the knowledge of the database and get the database free e-book. .
边栏推荐
- Exercise 8-10 output student grades (20 points)
- Servlet基本原理与常见API方法的应用
- What is devsecops? Definitions, processes, frameworks and best practices for 2022
- 有老师知道 继承RichSourceFunction自定义读mysql怎么做增量吗?
- uniapp 处理过去时间对比现在时间的时间差 如刚刚、几分钟前,几小时前,几个月前
- Exercise 7-3 store the numbers in the array in reverse order (20 points)
- Golang Modules
- Hands on deep learning (38) -- realize RNN from scratch
- Rhcsa learning practice
- Use C to extract all text in PDF files (support.Net core)
猜你喜欢
【FAQ】华为帐号服务报错 907135701的常见原因总结和解决方法
Hands on deep learning (39) -- gating cycle unit Gru
The time difference between the past time and the present time of uniapp processing, such as just, a few minutes ago, a few hours ago, a few months ago
Hands on deep learning (44) -- seq2seq principle and Implementation
The future education examination system cannot answer questions, and there is no response after clicking on the options, and the answers will not be recorded
[200 opencv routines] 218 Multi line italic text watermark
Normal vector point cloud rotation
How can Huawei online match improve the success rate of player matching
【Day1】 deep-learning-basics
Servlet基本原理与常见API方法的应用
随机推荐
Map container
Golang Modules
Lavel document reading notes -how to use @auth and @guest directives in lavel
leetcode1229. Schedule the meeting
Normal vector point cloud rotation
Exercise 9-5 address book sorting (20 points)
Modules golang
Network disk installation
Hands on deep learning (40) -- short and long term memory network (LSTM)
Velodyne configuration command
uniapp 小于1000 按原数字显示 超过1000 数字换算成10w+ 1.3k+ 显示
leetcode1-3
Service developers publish services based on EDAs
Debug:==42==ERROR: AddressSanitizer: heap-buffer-overflow on address
How can Huawei online match improve the success rate of player matching
Machine learning -- neural network (IV): BP neural network
Rhcsa operation
Exercise 9-4 finding books (20 points)
原生div具有编辑能力
C language pointer interview question - the second bullet