Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
Lists: pgsql-sql


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?



pgsql-sql by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group