LoginSignup
1
0

動的に複数の曖昧条件でSELECTを行う

Posted at

サンプルSQL

with dynamicLikeCondition AS (
	select 'A%' AS VALUE from dual
	union all
	select '%B1' AS VALUE from dual
	union all
	select '%C%' AS VALUE from dual
)
SELECT
	M.*
FROM MyTable M
WHERE EXISTS(SELECT * FROM dynamicLikeCondition COND WHERE M.KEY like COND.VALUE)
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0