开发者

Accessing sequence created in oracle database from php script

开发者 https://www.devze.com 2022-12-18 02:38 出处:网络
I have createdsequence in datab开发者_运维技巧ase like, CREATE SEQUENCE seq INCREMENT BY 1; How can i assign the current value of seq in $t;

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

精彩评论

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

关注公众号