Possible Duplicate:
Oracle sequences: CURRVAL not allowed here?
In my program i am inserting a values using sequence.
Procedure 1
Insert tablename(id,name) values(seq.nextval,somename)
now i need to update this same table. how do i do it. I use another Procedure to update.
Procedure 2
Update set name ='someothername'
where id = seq.currval
but i get an error that i cannot use sequence in where clause. How do i rewrite my update condition so as to use my current sequence value to update.