How to find if a value exists within a VARRAY

后端 未结 3 1367
不思量自难忘°
不思量自难忘° 2020-12-22 00:35

I\'ve created a VARRAY within a table (below) I would like to query whether or not a Title has a particular theme, eg. Show \'Action\' games. I\'m not to sure how to go abou

3条回答
  •  执念已碎
    2020-12-22 01:15

    For multiple themes you could do something like

    select g.Title
    from game_table g, table(g.gameTheme) t
    where t.Theme in ('FPS','Action')
    group by g.Title having count(0) = 2;
    

    This could also allow you to do things like get titles with exactly n matches, at least n matches, at most n matches...

提交回复
热议问题