[GRASS-user] db.execute: SELECT STATEMENT
Wolf Bergenheim
wolf+grass at bergenheim.net
Tue Jan 30 17:06:57 EST 2007
Jarek Jasiewicz wrote:
> But what about this (sample test query):
>
> echo "UPDATE testpoint_2 SET test=(SELECT max(cat) FROM testpoint_1)
> WHERE cat IN (SELECT cat FROM testpoint_3 WHERE x>10)" | db.execute
>
> it works! AFAIK such quries are treated as both SELECT and UPDATE query!
>
Yes it works since it is an 'UPDATE' query. Since it doesn't return a
list of results. It returns success or fail. A select query is one which
*begin* with the 'SELECT' statement.
SELECT something FROM sometingelse WHERE ...
--Wolf
--
<:3 )---- Wolf Bergenheim ----( 8:>
More information about the grass-user
mailing list