开发者

Accessing sequence created in oracle database from php script

I have created sequence in datab开发者_运维技巧ase like,

CREATE SEQUENCE seq INCREMENT BY 1;

How can i assign the current value of seq in $t;

<?php

$t=?;

?>


If you want the next value from the sequence you would run the sql statement below and fetch back the results of the myseq column.

select seq.nextval myseq
  from dual;


Run this query and fetch the result of it:

SELECT seq.CURRVAL FROM dual
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜