查询出来的值怎么赋值不了给变量pmd呢?
我是在存储过程里写的pmd char
pmd:=select max(salesdate) from lsdpDELETE FROM LFDP where salesdate=pmd 

解决方案 »

  1.   

    select max(salesdate) into pmd from lsdp;不明白看我空间加qq
      

  2.   

    先找本书看看吧:《精通oracle 10g pl/sql编程》
    或者找个视频看看:韩顺平《玩转ORACLE》
      

  3.   

    兄弟,你的写法是有问题的。应该使用select into 语法pmd char;select max(salesdate)into pmd from lsdp;接着你可以使用dbms_put函数来查看pmd变量。
      

  4.   

    delete from lsbp a
    where salesdate=(
    select max(salesdate) from lsdp b
    where a.id=b.id);
      

  5.   

    select。。    into。。
      

  6.   

    pmd:=select max(salesdate) from lsdp
     没有这样写法的。
      

  7.   


    pmd number;
    select max(salesdate) into pmd from lsdp; 
      

  8.   

    select max(salesdate) into 变量 from lsdp