27 Nov
2007
27 Nov
'07
6:59 p.m.
On Nov 27, 2007 11:53 AM, Niels Nes
On Tue, Nov 27, 2007 at 11:35:35AM -0700, m h wrote:
create sequence seq as integer; select next value for seq;
Ok, (sorry if I'm being slow). So if a table has an autoincremented column, is that using sequences? Can I pull the next value out using SQL? auto_increment uses (anonymous) sequence numbers and its default value is set to 'next value for';
Great. Is there a way to ask sequences for the previous value? Or is it only next? only next.
So if I use SERIAL or AUTOINCREMENT columns, what is the way to get the most recently inserted ID? (Am assumming it's not possible?)