开发者

if this week is empty, don't show this week

开发者 https://www.devze.com 2023-04-13 09:03 出处:网络
My program get weeks in weeks table. And I have challange table and challange_week column in challange table for 开发者_StackOverflowunite two table.

My program get weeks in weeks table. And I have challange table and challange_week column in challange table for 开发者_StackOverflowunite two table.

I want to if gotten week is empty, don't show this week. Can i do this with just one SQL query?


left outer join?

    select * from weeks w
    left outer join challange c on w.week = c.challange_week
    where c.challange_week is not null
0

精彩评论

暂无评论...
验证码 换一张
取 消