OK. In SQL 2005, you can actually include the OUTPUT keyword into an INSERT statement.
Here's an example that creates a table variable with an identity column, inserts a new row, and outputs the value of the identity column as a result set.
You can also use the scope_identity that I mentioned before, or you can use this.
DECLARE @tTestTable TABLE ( MyIdentityCol int IDENTITY, Name char(100))
INSERT INTO @tTestTable
OUTPUT Inserted.MyIdentityCol
VALUES ('KEVIN')
Note the reference to 'inserted'....this, along with 'deleted' were two system tables previously available only in insert/update triggers. They're now accessible during an insert/update statement/delete statement.
Not trying to overload you, but figured it might be worth knowing down the road.
Kevin