小编Ily*_*ath的帖子

如何在 prisma 客户端中检索具有相同表的子查询?

select * 
from WeeklyChallengeCourses 
where weekly_challenge_id = (select weekly_challenge_id 
                             from WeeklyChallengeCourses 
                             where course_id = 210);
Run Code Online (Sandbox Code Playgroud)

结果将是以下选定的一项:

在此输入图像描述

const data = await context.prisma.weeklyChallengeCourses.findMany({
        where:{
            weekly_challenge_id: {
                ..............
            }
        },
    });
Run Code Online (Sandbox Code Playgroud)

postgresql node.js prisma prisma-graphql

4
推荐指数
1
解决办法
6358
查看次数

标签 统计

node.js ×1

postgresql ×1

prisma ×1

prisma-graphql ×1