hello list,

   my apologies if this turns out as a duplicate/repost.

   i'm still a bit fresh to this whole database thing, and i've got a
question i'm hoping someone can help me with.

   i need to know what the primary key is for an insert into a table so
that i can add another bit of data into another table which has a
foreign key to this primary table.  this primary key is a serial number
that automatically increments on insert, so i don't know ahead of time
what the number will be.  as far as i can tell i should be able to use
cursors for this, but i don't know the syntax which i should use for
MSSQL-2000.

   i found an example for Informix, but it doesn't work for SQL2000:

http://www.bignosebird.com/notebook/informix1.shtml

   does anyone out there know how i should approach this?

thanks,
    twkonefal

-- 
  "The stuff you own ends up owning you ... It's only after you've lost 
everything that you're free to do anything." --tyler durden

New Media Copyright Extensions Would Harm Canada: 
http://ansuz.sooke.bc.ca/icsub.html

Reply via email to