0

How to use scope_identity in JDBC? I have to insert one table (which is in SQL Server ) primary key value into another table which is using first table primary key as foreign key.

Dale K
  • 25,246
  • 15
  • 42
  • 71
Arav
  • 1
  • 2
  • Actually , I want to retrieve primary key value from one table and want to insert it into another table – Arav Aug 24 '20 at 06:47
  • You shouldn't use scope_identity in JDBC, you should use the generated keys facility (which below the covers may or may not use scope_identity). – Mark Rotteveel Aug 24 '20 at 09:42
  • From that , I'm getting error , please see to the below code – Arav Aug 24 '20 at 10:06

0 Answers0