sql can i substitute

From: Kenneth Gonsalves <lawgon(at)thenilgiris(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: sql can i substitute
Date: 2004-12-17 11:25:45
Message-ID: 0412171655451H.06834@thenilgiris.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

hi

table:

name varchar(10)
fruit integer

i want to write an sql statement like this:

select fruit from table

which should return 'good' if fruit = 1 and 'bad' if fruit =2 and 'rotten' if
fruit =3

can it be done?

kg

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Andreas Kretschmer 2004-12-17 11:45:33 Re: [despammed] sql can i substitute
Previous Message Marcus Claesson 2004-12-17 09:46:45 can't get the order I want after inserting new rows