Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

With SQL, when inserting values into a Table from a SP, is it possible to get the value of the Primary Key before the values are added to the Table?

share|improve this question
"before the values are added to the Table"? No, because someone might get in before you and insert something. What problem are you trying to solve? – spender 44 mins ago
@spender - You seem to be assuming IDENTITY it is certainly possible with externally generated PK values such as sequences or guids. – Martin Smith 40 mins ago
SQL is just the Structured Query Language - a language used by many database systems, but not a a database product... many things are vendor-specific - so we really need to know what database system (and which version) you're using (please update tags accordingly).... – marc_s 36 mins ago

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.