当前位置:网站首页>MySQL basic statement
MySQL basic statement
2022-07-02 11:22:00 【Xi Xin o】
// modify SQL Middle table name
alter table < The original table name > rename to < The new name of the table >;
// Add a new field to the table
alter table < Table name > add < Add field name > < Field type >
// Update a field in the table
update < Table name > set < Update field name > = < value >
// Update a column in a row in the table
update < Table name > set < Update field name >=< value > where < Conditions >
// Delete data in table
delete from < Table name > where < Conditions >
// Modify the name of the table
alter table < Table name > rename to < The new name of the table >;
// sql Find custom sort order
select * from < Table name >
order by case
when id = 102 then 1
when id = 99 then 2
when id = 100 then 3
when id = 101 then 4
else id end asc
// The final data obtained is in id (102, 99, 100, 101) The order
边栏推荐
- The first white paper on agile practice in Chinese enterprises was released | complete download is attached
- Mongodb learning and sorting (condition operator, $type operator, limit() method, skip() method and sort() method)
- [play with FPGA learning 4 in simple terms ----- talk about state machine design]
- Complement (Mathematical Simulation
- 启牛商学院给的股票账户安全吗?能开户吗?
- Huawei game failed to initialize init with error code 907135000
- Some things configured from ros1 to ros2
- ImportError: cannot import name ‘Digraph‘ from ‘graphviz‘
- [AGC] build service 3 - authentication service example
- [play with FPGA learning 5 in simple terms ----- reset design]
猜你喜欢

金山云——2023届暑期实习

Solve the problem of data blank in the quick sliding page of the uniapp list

在连接mysql数据库的时候一直报错

mmrotate旋转目标检测框架使用记录

C#多维数组的属性获取方法及操作注意

Mongodb learning and sorting (condition operator, $type operator, limit() method, skip() method and sort() method)

PowerBI中导出数据方法汇总

CTF record

Verilog 和VHDL有符号数和无符号数相关运算

tidb-dm报警DM_sync_process_exists_with_error排查
随机推荐
TIPC Cluster5
Static variables in static function
Mongodb learning and sorting (condition operator, $type operator, limit() method, skip() method and sort() method)
The most detailed MySQL installation tutorial
对毕业季即将踏入职场的年轻人的一点建议
TIPC介绍1
原生方法合并word
JS——每次调用从数组里面随机取一个数,且不能与上一次为同一个
从ros1到ros2配置的一些东西
Appgallery connect scenario development practice - image storage and sharing
Array splitting (regular thinking
[AGC] how to solve the problem that the local display of event analysis data is inconsistent with that in AGC panel?
Tick Data and Resampling
二.Stm32f407芯片GPIO编程,寄存器操作,库函数操作和位段操作
Luogu p4281 [ahoi2008] emergency gathering / gathering (tree doubling LCA)
tqdm的多行显示与单行显示
Supermarket (heap overload
Resources reads 2D texture and converts it to PNG format
How to transfer event objects and user-defined parameters simultaneously in Huawei express applications
ROS lacks xacro package