Reputation: 107
I have a column in SQL that has multiple "Definitions" but I would like anything that starts with DEF to just be the generic "Definition".
What can I put in my Select statement to have this converted?
Upvotes: 0
Views: 38
Reputation: 1270021
You can use case
:
select (case when current_output like 'DEF%' then 'DEFINITION'
else current_output
end) as desired_output
Upvotes: 4