当前位置:网站首页>SQL learning alter add new field
SQL learning alter add new field
2022-07-05 09:27:00 【Xu Jiajia 233】
summary
When developers maintain table when , We often encounter the scene of changing the structure of the table .
And that's where it comes in alter.
It should be noted that , Changing table Structure of , If a field is added , Then it needs to pass update To assign values to new fields .
Demo
create table Person (
name string,
age int
);
insert into Person values
("AAA",16),
("BBB",10),
("CCC",20);
sql Code
-- Insert new field
alter table Person add adult boolean;
-- Update data
update Person SET adult=age>=18;
select * from Person;
result
AAA|16|0
BBB|10|0
CCC|20|1
边栏推荐
- Blogger article navigation (classified, real-time update, permanent top)
- OpenGL - Model Loading
- Understanding rotation matrix R from the perspective of base transformation
- 利用请求头开发多端应用
- Applet (global data sharing)
- Using request headers to develop multi terminal applications
- [technical school] spatial accuracy of binocular stereo vision system: accurate quantitative analysis
- Principle and performance analysis of lepton lossless compression
- 深入浅出PyTorch中的nn.CrossEntropyLoss
- 微信小程序获取住户地区信息
猜你喜欢

高性能Spark_transformation性能

Generate confrontation network

初识结构体

OpenGL - Lighting

AUTOSAR from getting started to mastering 100 lectures (103) -dbc file format and creation details

OpenGL - Coordinate Systems

A keepalived high availability accident made me learn it again
![Introduction Guide to stereo vision (4): DLT direct linear transformation of camera calibration [recommended collection]](/img/ed/0483c529db2af5b16b18e43713d1d8.jpg)
Introduction Guide to stereo vision (4): DLT direct linear transformation of camera calibration [recommended collection]

Lepton 无损压缩原理及性能分析

Applet network data request
随机推荐
浅谈Label Smoothing技术
【ManageEngine】如何利用好OpManager的报表功能
Kotlin introductory notes (VII) data class and singleton class
【阅读笔记】图对比学习 GNN+CL
np. allclose
Kotlin introductory notes (IV) circular statements (simple explanation of while, for)
2309. 兼具大小写的最好英文字母
[beauty of algebra] solution method of linear equations ax=0
Generate confrontation network
Transfer learning and domain adaptation
Unity skframework framework (24), avatar controller third person control
Kotlin introductory notes (VIII) collection and traversal
驾驶证体检医院(114---2 挂对应的医院司机体检)
编辑器-vi、vim的使用
Wxml template syntax
利用请求头开发多端应用
Lepton 无损压缩原理及性能分析
一文详解图对比学习(GNN+CL)的一般流程和最新研究趋势
Rebuild my 3D world [open source] [serialization-2]
[Yugong series] go teaching course 003-ide installation and basic use in July 2022