当前位置:网站首页>About MySQL data insertion (advanced usage)
About MySQL data insertion (advanced usage)
2022-08-02 01:15:00 【CSDN Q&A】
Question: How to add a new column in the tableAdd a column of data, which is used to judge the data situation of the existing column. The effect of the specific problem is as follows: (The solution must be adopted)
Known table: t_score
id subject score
1 JAVA 60
2 MYSQL 80
3 LINUX 55
4 PYTHON 50
5 HTML 70
Write a sql, increase the passing column, as follows (the passing score is 60):
id subject score mark
1 JAVA 60 ok
2 MYSQL 80 ok
3 LINUX 55 no
4 PYTHON 50no
5 HTML 70 ok
The code for creating the table is as follows
# 2.Title known table: t_scoredrop table if exists t_score;create table if not exists t_score( id int comment 'student number', `subject` varchar(10) comment 'subject', score int comment 'grades')engine = innodb default charset = utf8 comment 'Grade Sheet';# Insert data insert into t_score values (1,'JAVA',60),(2,'MYSQL',80),(3,'LINUX',55),(4,'PYTHON',50),(5,'HTML',70);# View table data select * from t_score; 边栏推荐
猜你喜欢
随机推荐
抖音数据接口API-获取用户主页信息-监控直播开启
C语言实现扫雷游戏
MInIO入门-03 秒传+大文件分片上传
Docker安装canal、mysql进行简单测试与实现redis和mysql缓存一致性
ERROR 1819 (HY000) Your password does not satisfy the current policy requirements
Kubernetes — Calico
冒泡排序函数封装
fastjson详解
go版本升级
Flask gets post request parameters
Pytorch seq2seq model architecture to achieve English translation tasks
Kubernetes — 核心资源对象 — 网络
JS中localStorage和sessionStorage
go笔记——map
接口(第九天)
Can‘t connect to MySQL server on ‘localhost3306‘ (10061) 简洁明了的解决方法
datax与datax-web安装部署
go笔记记录——channel
【软件工程之美 - 专栏笔记】34 | 账号密码泄露成灾,应该怎样预防?
Realize deletion - a specified letter in a string, such as: the string "abcd", delete the "a" letter in it, the remaining "bcd", you can also pass multiple characters to be deleted, and pass "ab" can









