Skip to content
Advertisement

SQL: use CASE with AS

I’m working on a long SQL request and I want to use CASE inside but I don’t know how to write it. My request looks like :

I want to add something like :

I tried to add this at the end but it didn’t work :

My goal is to edit key along its value

Advertisement

Answer

You can do a subquery:

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