日期:2014-05-17 浏览次数:20490 次
--create table tb( [zzh] [int] IDENTITY(1,1) NOT NULL,[zzm] nvarchar(11),[qh] int NOT NULL)
select MAX(zzh) zzh from jh6
insert into jh6 (zzm,qh) values ('01050101001',900)
select zzh,zzm,qh from jh6 where zzm='01050101001' and qh=900
--结果
/*
zzh
-----------
2558
(1 row(s) affected)
(1 row(s) affected)
zzh zzm qh
----------- ----------- ------
6 01050101001 900
(1 row(s) affected)
*/