Search Postgresql Archives

Re: Conditional on Select List

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks this is exactly what I need it.

Fernando

Tom Lane wrote:
Fernando <fernando@xxxxxxxxxx> writes:
  
Is it possible to do this?
SELECT IF(COUNT(colname) > 0, TRUE, FALSE) AS colname FROM table;
    

SELECT COUNT(colname) > 0 AS colname FROM table;

If you really like to type, you could use a CASE _expression_.

			regards, tom lane

  

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux