第1个回答 2011-08-08
select * from A,B,C where substr(A.a,1,3) = B.b and substr(A.a,4,3) = c;本回答被提问者采纳
第2个回答 2011-08-08
SELECT A.a FROM A,B,C WHERE SUBSTRING(A.a,1,3)=B.b AND SUBSTRING(A.a,4,3)=C.c
第3个回答 2011-08-08
ORACLE:
SELECT * FROM A,B,C WHERE INSTR(substr(a,1,3),b) > 0 or INSTR(substr(a,4,3),c) > 0
SQLSERVER:
SELECT * FROM A,B,C WHERE charindex(substring(a,1,3),b) > 0 or charindex(substring(a,4,3),c) > 0