gpt4 book ai didi

sql - Oracle SQL - 带有 Where 子句的插入语句

转载 作者:行者123 更新时间:2023-12-01 23:42:44 25 4
gpt4 key购买 nike

我试图将数据插入到表中特定行的特定列中,我确定我做错了什么,因为这是我第一次使用 Where 执行插入语句:

insert INTO mekka_h_o_a_fees
columns(money_handed_to_commity),
Where Month_Year = July
VALUES(Yes)

提前致谢

最佳答案

我认为您需要更新,而不是插入。语法是:

update mekka_h_o_a_fees
set money_handed_to_commity = 'Yes'
where month_year = 'July'

这将 money_handed_to_commity 列设置为 'Yes',其中 month_year 列的值为 'July'.

关于sql - Oracle SQL - 带有 Where 子句的插入语句,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64760289/

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