首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > oracle >

求如下一条SQL语句应该如何写

2012-02-26 
求如下一条SQL语句应该怎么写?select*fromtablewherekeylike%××%其中这个××要用selectkeyfromtablewhereid

求如下一条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 "是一样的!!!
呵呵,接分

热点排行