IF statement in Select - Mailing list pgsql-sql

From Renato Cramer
Subject IF statement in Select
Date
Msg-id C1C69E45A81644499CED2306D960C155B9D35D@VERTICAL
Whole thread Raw
Responses Re: IF statement in Select  ("William Leite Araújo" <william.bh@gmail.com>)
List pgsql-sql
Hello all,

Is the use of IF statement restrict to Functions and Store Procedures?

I'm trying to use an IF within Select...

Example:
create view v1 as
select c1,c2,if c3 = 52 then 0else 1endif as base_irrf_13from t1;

Thanks in advance,

Renato Cramer.


pgsql-sql by date:

Previous
From: Michael Burke
Date:
Subject: SELECT composite type
Next
From: "William Leite Araújo"
Date:
Subject: Re: IF statement in Select