Unanswered: how to update the colum in the same table after insert one row?
i have a table called student(studentId,name,studentNo).
the studentNo is to be updated with studentId+'some text' after inserting the
if i pass value like student(1,jack)
then the row should be updated like
how to retrieve the value generated by the trigger?
thank you mr.vivek
it works fine.
i am using hibernate to persist the student (studentid, stu_name,sno) object.while i am saving the student object the sno column is updated through the trigger.after saving the student object i can't get the student object with sno value which is updated by the trigger.how can i get that!pls reply.
@Littlefoot: I would say the reason is "hibernate". I do not know that tool, but it seems to be "just another interface over database sql to disable most its features".
To the solution: Either issue INSERT statement with RETURNING clause (this is the place where the value of SNO would be returned) or use that formula (it is not that difficult, just a string concatenation) before issuing INSERT and fill SNO column directly with it.