I have linked a basic database containing 2 tables, Login and Customer:
Login
contains (CustomerID
,loginID
,password
)Customer
contains (CustomerID
,name
,last
,dob
)
CustomerID
is primary key in both fields, and is the auto-increment value in the Login table.
When I want to register a new user, I want to FIRST populate Login table (which has CustomerID
as an auto-increment value)
How do I get the next auto-increment value from Login
so I could use it when populating the Customer
table?
I am using SQL Server 12.