How to retrieve a single value from the query
I need to increment the primary key in the table also after increment i've to add it..
select @ncode=count(N_ID) from [table name]
if @ncode=0
select @ncode=1
else
select @ncode=max(N_ID)+1 from [table name]
insert into [table name](N_ID,Name,Salary)values (@N_ID,@Name,@Salary)
I write this in stored procedure.. But i cant insert a record through the parameters in code behind