Hassan Siddiqui

Hassan Siddiqui

  • NA
  • 152
  • 14.9k

sql procedure for select and insert at same time

Jul 4 2018 6:54 AM
Hi dear reader
thanks for devoting your precious time.
Here my question is 
 
i have a table tblChallanNumber
i want to write a store procedure such that 1st i select the last entered challan number and then add 1 to this and then insert incremented challan number at the same table.
and finally i want to select the new challanNumber to print .
 
and importantly i want to do the above all work in a singe store procedure.
 
thanks.  

Answers (7)