变量Input是获取输入的值,不知道怎么写select * from tab1
where com1 like '+Input+%';
这样不能查询到值

解决方案 »

  1.   

    select * from tab1
    where com1 like '%Input+%';
    这样吧~~
      

  2.   

    select * from tab
    where col like '&Input%'这种写法
      

  3.   

    最起码你要说明你用的什么环境: VB? C,C++,C#? delphi? 或PLSQL Devloper?
    每个语言的字符串处理是不一样的啊?另外上面的的几种好像都不对,Input是不是变量?
      

  4.   

    select * from tab1
    where com1 like '''||to_char(Input)||'%''';
      

  5.   

    & 是在脚本运行时即时输入一个值,select * from tab where tablename =&tablename;但是不能这样用: col like '&Input%'
    这是错误的。
      

  6.   

    select * from tab1
    where com1 like '''||to_char(Input)||'%'''