Home > Mobile >  Sql table data display change
Sql table data display change

Time:10-13

I am fetching data from a column Status where the data are stored as A which stands for Active and L for Leavers.

When fetching the data, I want to display the data as Active and Leavers only and not to update the column data.

Can someone please help me.

Thank you for your help.

CodePudding user response:

you can use case expression inside your select :

select
    case 
    column_name 
    when 'A' then 'Active' 
    when 'L' then 'Leavers' end as column_name
from table_name
  • Related