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.
Asked
Active
Viewed 16 times
0
-
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