Getting inserted row

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
major
Forum Newbie
Posts: 3
Joined: Fri Apr 02, 2004 4:00 am

Getting inserted row

Post by major »

Is there any way to get the values I just inserted ?

ok like this it seems crazy but Im using a sequence Number (SERIAL) for Primary Key.
So when I insert a new row I dont know what will be the number.

So can I get that number or I need to do an query before getting the maximum value before the insert and increment that number by 1 (i find this way kind a wierd)

BTW Im using postgresql

Major
lostboy
Forum Contributor
Posts: 329
Joined: Mon Dec 30, 2002 8:12 pm
Location: toronto,canada

Post by lostboy »

Post Reply