I have a table that holds client informations
[ID] [int] IDENTITY(1,1) NOT NULL, // Primary Key
[Name] [varchar](50) NOT NULL,
[User] [varchar](50) NOT NULL,
[Adrss] [varchar](50) NOT NULL,
[Connected] [int] NOT NULL,
then i have a Stored Precedure
procedure AddClient
@Name Varchar(50),
@User Varchar(50),
@Adrss Varchar(50),
@Connected Int
as
Insert into Clients(
Name,
User,
Adrss,
Connected)
Values(
@Name,
@User,
@adrss
@Connected)
So The Field ID
is auto increment I want to retreive it's value while inserting i want to return the insert position
Note 1 : I'm searching for another method than the Max(ID +1)
Note 2 : Please note that if any row is deleted the value will continue increment the Deleted ID won't be regenerated.