Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我如何在同一张表中对 2 列求和?什么是正确的sql做一个加号
示例: 我在同一张表上有 2 列:currentcharges & overduecharge 我需要做一个语句 currentcharge + overduecharge。
select currentcharge + overduecharge as total_charge from the_table
别名 ("total_charge") 是可选的,但如果您稍后需要参考计算列时会很有帮助。