How to SUM two fields within an SQL query

前端 未结 8 2058
南笙
南笙 2020-11-28 21:58

I need to get the total of two fields which are within the same row and input that number in a field at the end of that same row.

This is my code.

S         


        
8条回答
  •  误落风尘
    2020-11-28 22:48

    SUM is used to sum the value in a column for multiple rows. You can just add your columns together:

    select tblExportVertexCompliance.TotalDaysOnIncivek + tblExportVertexCompliance.IncivekDaysOtherSource AS [Total Days on Incivek]
    

提交回复
热议问题