티스토리 뷰

공부

[SQL] LIKE subquery

seunggabi 승가비 2021. 2. 9. 01:05
728x90
SELECT t.* 
FROM t 
WHERE EXISTS ( 
  SELECT 1 
  FROM tt 
  WHERE t.name LIKE '%' || tt.name || '%'
);

https://dba.stackexchange.com/questions/124844/how-to-use-like-with-subquery/124846#124846

 

How to use LIKE with subquery?

In a SQLITE3 DB, I have a table A with a column 'word' containing search words that partially match a column in another table B. I'd like to SELECT all rows FROM table B WHERE B.name LIKE %

dba.stackexchange.com

 

728x90

'공부' 카테고리의 다른 글

[Java] everything of encoding  (0) 2021.02.09
[Java] NumberUtils.toInt(null) -> 0  (0) 2021.02.09
[SQL] LIKE subquery  (0) 2021.02.09
[Java] re try catch  (0) 2021.02.09
[Python] has key dict  (0) 2021.02.09
[Sh] date this sunday `date +%Y%m%d -d 'next sunday - 1 week'`  (0) 2021.02.03
댓글
댓글쓰기 폼