怎么查询表Face中字段id的最后一行,并获得取它的值???
------解决方案--------------------
select top 1 id
from face
order by id desc
------解决方案--------------------
select top 1 id
from face
order by id desc
go
------解决方案--------------------
select top 1 id from face order by id desc
------解决方案--------------------
create table face(id int identity(1,1) primary key not null, face_id int )
insert into face
select 1 union all
select 1 union all
select 1 union all
select 1
------解决方案--------------------
select scope_identity() as maxID