M
M
Mark2021-11-21 17:13:21
PostgreSQL
Mark, 2021-11-21 17:13:21

I can't figure out how to correctly display the value from the table through select?

I'm learning database and ran into a problem.
There is a table in my database:
619a52dd11e72458457825.png

I need to display something like this:
619a5360933a7177217372.png

But I can't figure out how to bind my column "gender" so that in my display next to female and male names it would display he\she

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
idShura, 2021-11-21
@incandescent99

select case when gender = 'm' then 'he' else 'she' end from ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question