1 Jul
2010
1 Jul
'10
2:38 p.m.
On 01-07-2010 08:31:02 -0400, Mark Bucciarelli wrote:
On Thu, Jul 1, 2010 at 8:08 AM, Mark Bucciarelli
wrote: Given a table with a sequence that controls the primary id, is there a SQL command I can run to get the name of that sequence?
Never mind, sqlmanual.pdf to the rescue.
SELECT default FROM columns WHERE table_id = %d AND name = 'id' ;
That can also return something else but a call to the next sequence value, e.g. '5'. Not sure if that is a problem for you/django.