Skip to content
Advertisement

Select 2 columns in one and combine them

Is it possible to select 2 columns in just one and combine them?

Example:

select something + somethingElse as onlyOneColumn from someTable

Advertisement

Answer

Yes, just like you did:

select something + somethingElse as onlyOneColumn from someTable

If you queried the database, you would have gotten the right answer.

What happens is you ask for an expression. A very simple expression is just a column name, a more complicated expression can have formulas etc in it.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement