select article_id_seq.curval into v_id from dual;

解决方案 »

  1.   

    更正
    select article_id_seq.currval into v_id from dual;
      

  2.   

    报错,说缺少关键字.我的表名是t_announce,字段名是article_id
      

  3.   

    Dual 是 Oracle中的一个实际存在的表,任何用户均可读取,常用
    在没有目标表的Select中.
      
     我的是My Sql数据库吧?我看看去!
      

  4.   

    I think what George is thinking about is a function similar to Oracle's sequence.CURRVAL which is easily obtained by using this query:SELECT LAST_INSERT_ID()