declare 
weijibianma varchar2(10) := '1000003';
select * from tbkehuxinxi t where t.weijibianma = weijibianma

解决方案 »

  1.   

    还是不行呀提示:
    ERROR 位于第 2 行:
    ORA-06550: 第 2 行, 第 20 列:
    PLS-00103: 出现符号 "("在需要下列之一时:
    constant exception
    <an identifier> <a double-quoted delimited-identifier> table
    LONG_ double ref char time timestamp interval date binary
    national character nchar
    符号 "<an identifier>" 被替换为 "(" 后继续。
    ORA-06550: 第 3 行, 第 1 列:
    PLS-00103: 出现符号 "SELECT"在需要下列之一时:
    begin function package
    pragma procedure subtype type use <an identifier>
    <a double-quoted delimited-identifier> form current cursor
    符号 "begin" 被替换为 "SELECT" 后继续。
    ORA-06550: 第 3 行, 第 61 列:
    PLS-00103: 出现符号 "end-of-file"在需要下列之一时:
    . ( * @ % & - + ; /
    at for mod rem <an exponent (**)> and or group having
    intersect minus order start union where connect ||
      

  2.   

    Eric_1999(╙@^@╜) 犯了低级错误,变量的名称不能与字段名称相同,否则会查出全部的记录,为什么我就不说了,自己想想吧
    select * from tbkehuxinxi t where t.weijibianma = weijibianma
      

  3.   

    oh,my god~~~我都没看,就直接改了楼主的sql而已。
      

  4.   

    谢谢wxmwxmwxm(毛毛毛毛)执教!
    declare 
    w varchar2(10) := '1000003';
    select * from tbkehuxinxi t where t.weijibianma = w
      

  5.   

    好久没用sql server了,凑个热闹!
      

  6.   

    to: Eric_1999(╙@^@╜) ( ) 
    其实wxmwxmwxm(毛毛毛毛) ( ) 的意见我早己知道,但是我就是在变量名与字段名不同的情况下产生上面的错误,不知是什么原因