[postgis-users] Except

Kevin Neufeld kneufeld at refractions.net
Wed Nov 28 07:58:37 PST 2007


How about,

SELECT col1, col2, col3 FROM my_tbl
EXCEPT
(SELECT col1, col2, col3 FROM my_tbl LIMIT 1);

-- Kevin

Matt Doughty wrote:
>
> Hi,
>
> Is there a way of selecting all fields except one in particular? I’d 
> like to create a query that says something like: select * except 
> field01. The thing is the query needs to be valid for a number of 
> different tables, each with a different set of fields apart from one 
> (gid), which I don’t want to select.
>
> Cheers,
>
> Matt
>
> Matt Doughty
>
> 	
>
> GEOGRAMA S.L.
>
> Tel.: +34 945 13 13 72 652 77 14 15
>
> Fax: +34 945 23 03 40
>
> www.geograma.com
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>   



More information about the postgis-users mailing list