Announcement

Collapse
No announcement yet.

Last primary key

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Last primary key

    It is possible to know the primary key value of the last insert in a field sequential?

  • #2
    It depends. If the field is an autonumbering and you use MySQL then you can retrieve that by a sql statement:select last insertid();

    see http://dev.mysql.com/doc/refman/5.0/...last-insert-id

    But on oracle you need to do a select on nextval and I guess every DB has it's own way.
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment


    • #3
      We use postgresql and I solved it using a SQL query on the sequence of the primary key.

      The question was directed to whether there was any Scriptcase macro to make this independent inquiry database.

      Still, thanks for attention

      Comment

      Working...
      X