Archive for February 18th, 2009

You are browsing the archives of 2009 February 18.

Generating sequential numbers in a database

Generating sequential numbers in a database

You are creating an application that allows organisations to manage employees. One of the tasks that it has to do is generate an employee ID when a new employee is being entered. One way of doing this is through this query: SELECT max(empl_id)+1 FROM employee; However, this query presents a problem in a multiuser environment: [...]