hello list,

   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


-- 
"For, even if I believed in a natural right of property, independent of 
utility and anterior to legislation, I should still deny that this right 
could survive the original proprietor." -- Thomas Babington Macaulay

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

Reply via email to