GQL query help - How can I write a query with where clause in GQL ? I am using google appengine datastore

srivigneshwar picture srivigneshwar · Apr 17, 2010 · Viewed 8.2k times · Source

I have three records in a table example:

*Usernames*        *email*                *city*
Nick            [email protected]        London
Vikky           [email protected]       Paris
Lisa            [email protected]        Sydney

Now I want to get specific record keeping email ID as a key ,

SQL query may be like this

select * from table1 where email = "[email protected]" 

What is the equivalent GQL query for the above ??

Answer

CoreyD picture CoreyD · Apr 17, 2010
SELECT * FROM table1 WHERE email = '[email protected]' 

should work fine in GQL.

See here for more information http://code.google.com/appengine/docs/python/gettingstarted/usingdatastore.html