How to execute this in one query?
@Input = Select id from table2 where title="hh"
Output = `Select * from table1 where id=@Input
TABELE1
ID | B1 | B2 | B3 |
---|---|---|---|
1 | ALPHA | QWER | OK |
2 | BRAVO | ASDF | OK |
3 | CHARLIE | ZXCV | OK |
TABLE2
ID | C1 | C2 |
---|---|---|
1 | BRAVO | ONETWO |
2 | BRAVO | TRENETWUR |
3 | CHARLIE | FIVESIX |
4 | ALPHA | SEVENEIGHT |
Select * from TABLE1 where B1= (Select C1 from TABLE2 where concat(C2) like '%NETW%')
This is exactly what I am trying to do. But the query above doesn't still work. I prefer rows in TABLE1
as a result.