use adventureworks;
go
--display the value of locationid in the last row in the table.
select max(locationid) from production.location;
go
insert into production.location (name, costrate, availability, modifieddate)
values ('damaged goods', 5, 2.5, getdate());
go
select @@identity as 'identity';
go
--display the value of locationid of the newly inserted row.
select max(locationid) from production.location;
go