首页  >  文章  >  数据库  >  PostgreSQL 使用 delete 删除数据的时候关联多个表

PostgreSQL 使用 delete 删除数据的时候关联多个表

WBOY
WBOY原创
2016-06-07 14:54:503512浏览

删除game_pg_getpoint表中的数据,需要关联getpoint表 PostgreSQL DELETE FROM game_pg_getpoint USING getpoint WHERE (getpoint.fixflg = 1 OR game_pg_getpoint.immediately_flag=1) AND game_pg_getpoint.memberid = getpoint.memberid AND game_pg_getpo

删除game_pg_getpoint表中的数据,需要关联getpoint表 PostgreSQL
DELETE FROM game_pg_getpoint USING getpoint    
    WHERE (getpoint.fixflg = 1 OR game_pg_getpoint.immediately_flag=1)   
        AND game_pg_getpoint.memberid = getpoint.memberid   
        AND game_pg_getpoint.comment = getpoint.comment   
        AND game_pg_getpoint.thanksid = getpoint.thanksid   
        AND game_pg_getpoint.thanksname = getpoint.thanksname   
        AND game_pg_getpoint.getpoint_regist_date = getpoint.registdate  
声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn