Reputation: 727
I would like to remove any white spaces in my id
column and capitalize it simultaneously. The below code gives me a separate column where one is the removed white spaces and the other is the capitalized. Is it possible to apply both REPLACE
and UPPER
so that the output is one column instead of two ?
SELECT REPLACE(id, ' ', ''), UPPER(id) FROM db
Upvotes: 1
Views: 1373
Reputation: 311428
You can call one on the result of the other:
SELECT UPPER(REPLACE(id, ' ', '')) FROM db
Upvotes: 3