How I write pretty query. - Mailing list pgsql-sql

From Radovan Petrikí
Subject How I write pretty query.
Date
Msg-id 1051631377.3674.35.camel@caj
Whole thread Raw
List pgsql-sql
Hi , 


I have table 

------------------
id     |  name 
------------------
1         rado 
2         marek
3         pista 

I need make query. Your output is only (true or false) 

This 2 query are good but no pretty.

1)    SELECT COUNT(*) FROM table WHERE name=rado 
         -------------output      -->    COUNT(*)   1 

or 

2)    SELECT name FROM table WERE name=rado 
        -------------output       -->   name   rado 





and this is pretty query :-) buy no good.
SELECT (true or false) FROM table WHERE name=rado
        --------------output ---->        true 

How I write good and pretty query ? 

Thanks 

Rado 



pgsql-sql by date:

Previous
From: Sergey Holod
Date:
Subject: Making "SECURITY DEFINER" procedures..
Next
From: "Victor Yegorov"
Date:
Subject: Re: replace function