gpt4 book ai didi

Mysql 更新一系列数据,其中系列中缺少某些数字

转载 作者:行者123 更新时间:2023-11-29 07:57:59 24 4
gpt4 key购买 nike

我有 1 个包含 2000 行的表。我有这些专栏

roll_no  entrance_date  entrance_time  entrance_center

卷号从10011开始到10011704。我想更新特定系列数字的入场日期、中心、时间。假设我想将卷号 10011-100145 提供给考试中心 A,考试时间为上午 10 点,日期为 2015 年 1 月 1 日,其中上述系列中的一些卷号可能会丢失。那么更新语句怎么写呢?

最佳答案

使用Where子句!

update <tablename> set exam_center = A, exam_time = '10:00:00', date = '2015-01-01' where roll_no >= 10011  and roll_no <= 100145;

关于Mysql 更新一系列数据,其中系列中缺少某些数字,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24600500/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com