Code. Collaborate. Organize.
No Limits. Try it Today.
select max(isnull(id,0))+1 from table
select isnull(max(id),0)+1 from table
select coalesce( (select max(id) from YourTable), 0)
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)