you acn use another table to hold on the globel id.
table_globel_id<br />
@id as bigint
whenever inserting to any table use ID from this table
like: select isnull(id,0) from table_globel_id
and whenever complitiong the
sql query/transaction
increase the value of the id in
table_globel_id
.
like:
if exixt(select * from table_globel_id)
then
update table_globel_id set id=id+1
else
insert into table_globel_id(id)=1