当前位置:网站首页>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;
边栏推荐
猜你喜欢
随机推荐
Test Cases: Four-Step Test Design Approach
设备树学习
H5页面打开微信小程序
Flink_CDC搭建及简单使用
攻防世界-web-Training-WWW-Robots
Docker安装canal、mysql进行简单测试与实现redis和mysql缓存一致性
23.卷积神经网络实战-ResNet
Web开发
MInIO入门-03 秒传+大文件分片上传
管理基础知识21
管理基础知识20
go笔记之——goroutine
S/4中究竟有多少个模块,你对这些模块了解多少
21.数据增强
PowerBI商学院佐罗BI真经连续剧
flask获取post请求参数
DOA从一维阵列传感说起
Kunpeng compile and debug plug-in actual combat
AXI4协议介绍
swing的Jlist列表滚动条以及增加元素的问题