>Me parece que a variavel @@IDENT não confunde as bolas... Ela tem um valor para cada conexão, então se outro alguém estiver inserindo ao mesmo tempo, os valores serão diferentes, já que são conexões diferentes...
menos mal. :)
entretanto, tem algo no help do SQL que pede um pouco de cuidado se for usar esta variável. veja:
If the statement fires one or more triggers that perform inserts that generate identity values, calling @@IDENTITY immediately after the statement returns the last identity value generated by the triggers.
Claudio Lassala