日期:2014-05-17  浏览次数:20807 次

求如下一条SQL语句应该怎么写?
select   *   from   table   where   key   like   '%××% '
其中这个××要用select   key   from   table   where   id=传入的值来决定

怎么写成一句SQL   ?谢谢指教!

------解决方案--------------------
select *
from table
where key like '% '||(select key from table where id=传入的值来决定)|| '% '
------解决方案--------------------
||是字符串连接的意思,和 "concat "是一样的!!!
呵呵,接分