简体   繁体   中英

add two sql queries

How do I add two sql queries and result the final value of the second column ?

Example?

TABLE ONE

colum 1 | colum 2

10      |   5

RESULT:

TABLE ONE

colum 1 | colum 2

0       |   15

Query:

select colum 1 + colum 2 from TABLE ONE 

您是否要使用压缩后的值更新行?

UPDATE Table1 t1 SET t1.column2 = t1.column1 + t1.colum2, t1.column1 = 0;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM