【问题标题】:GQL query help - How can I write a query with where clause in GQL ? I am using google appengine datastoreGQL 查询帮助 - 如何在 GQL 中使用 where 子句编写查询?我正在使用谷歌应用引擎数据存储
【发布时间】:2010-04-17 21:00:12
【问题描述】:

我在一个表中有三条记录 示例:

*Usernames*        *email*                *city*
Nick            nick@example.com        London
Vikky           vicky@example.com       Paris
Lisa            lisa@example.com        Sydney

现在我想获取特定的记录保存电子邮件 ID 作为键,

SQL查询可能是这样的

select * from table1 where email = "vicky@example.com" 

上面的等效 GQL 查询是什么??

【问题讨论】:

    标签: google-app-engine gql gqlquery


    【解决方案1】:
    SELECT * FROM table1 WHERE email = 'vicky@example.com' 
    

    在 GQL 中应该可以正常工作。

    查看这里了解更多信息 http://code.google.com/appengine/docs/python/gettingstarted/usingdatastore.html

    【讨论】:

    • 嗨......如果我这样查询 SELECT * FROM table1 WHERE email = 'vicky@example.com'
    猜你喜欢
    • 1970-01-01
    • 2020-08-01
    • 1970-01-01
    • 1970-01-01
    • 2011-01-01
    • 2016-02-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多