求SQL语句:查询数据库中某一条数据是否更新 包括最新数据及历史 多谢~~
答案:2 悬赏:70
解决时间 2021-03-15 23:20
- 提问者网友:刪除丶後
- 2021-03-15 09:06
比如某数据起始时间是2000年到2010年 其中缺少2003年数据 写的SQL语句需要跑出更新的2011数据和补充的2003数据
最佳答案
- 二级知识专家网友:糜废丧逼
- 2021-03-15 10:37
--大概是这么个意思把
select * from [table1] a where year(youredate) between 2000 and 2011
and year(yourdate) in (select year(yourdate) from [table1] where id=a.id where year(yourdate)=2011)
--and 你的其他条件
select * from [table1] a where year(youredate) between 2000 and 2011
and year(yourdate) in (select year(yourdate) from [table1] where id=a.id where year(yourdate)=2011)
--and 你的其他条件
全部回答
- 1楼网友:而你却相形见绌
- 2021-03-15 11:15
sql更新数据库语句
update语句用于更新修改指定记录的数据,其用法为:
update tbl_name set col_name1=value1, col_name2=value2, … where conditions
对符合条件的记录,更新修改指定字段的值。若没有where条件限定,则对所有记录进行更新修改。例如:
图 4.23 更新记录
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯