| From: | Rado Petrik <r(dot)p(at)szm(dot)sk> | 
|---|---|
| To: | PostgreSQL-mailinglist <pgsql-sql(at)postgresql(dot)org> | 
| Subject: | How I write pretty query | 
| Date: | 2003-04-29 17:46:05 | 
| Message-ID: | 1051638365.775.95.camel@caj | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Stephan Szabo | 2003-04-29 17:55:00 | Re: How I write pretty query | 
| Previous Message | SZŰCS Gábor | 2003-04-29 16:03:48 | Re: Query Plan far worse in 7.3.2 than 7.2.1 |