Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
like と in を一緒に使用する方法
SELECT a FROM A WHERE a LIKE (SELECT b FROM B WHERE c='india');
ここで、列 a と b は等しくありませんが、以下に示すように b には a の最初の 3 桁のみが含まれます a=145xxxxxx; b=145;
どんな手掛かり?それを達成する方法は?
SELECT a FROM A WHERE EXISTS (SELECT 1 FROM B WHERE c='india' AND A.a LIKE CONCAT(B.b,'%') );