Is it possible to do addition in SQL

Hi,

Quick Q as I cant find much in books / google. If I wanted to add two columns together how would I do that in SQL?

1 plus 1 = 2

Where 1 is is column 1,   the other 1 is column 2 and the answer  is in the "total" column.

If it is possible what would the syntax look like?

Thanks!
deanparkrAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sdstuberCommented:
select column1, column2, column1 + column2  total from your_table
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Steve HoggITCommented:
SELECT 100 + 500 FROM DUAL;
SELECT COLA + COLB FROM TABLE
0
deanparkrAuthor Commented:
really?  that simple!  

Thanks!
0
SharathData EngineerCommented:
What exactly you want to add?
SELECT ColA + ColB FROM YourTableI
f ColA and ColB are numaric, you will get the sum. If anyone of them is Alpha-Numaric, it will concatinate both columns. Do you want the numaric data also to be concatinated? like 10 and 20 to be as 1020
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.