sql语句,想用模糊查询,但子查询的结果有多个,请问如何写?
ytcgj 2008-01-01 01:02:03 例如select P_name from person where P_NAME like %(select name from spellcode where lowcase='z')% 这样的句子,
括号里子查询(select name from spellcode where lowcase='z')得到多个查询结果,如何对子查询的结果再对表person进行模糊查询,用select P_name from person where P_NAME in(select name from spellcode where lowcase='z') 不行,是精确查询,语法没错误,但得不到结果。select P_name from person where P_NAME like %(select name from spellcode where lowcase='z')% 语句报错误。请问各位,我这种需要怎么要怎么写。谢谢。