Skip to content
Advertisement

Create New SQL Column With Smaller Buckets (Based on Text, not Numbers)

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?

Desired Output

Advertisement

Answer

You can use case:

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