sql test

use test
select isnull(max(CCC),0)+1 from [tab]  --返回表中指定列名中有多少条数据

select count(0) from (select * from tab) as dhs_table --统计表中的行数

insert into Areas() values () ;select @@IDENTITY  --用select @@identity得到上一次插入记录时自动产生的ID
原文地址:https://www.cnblogs.com/enych/p/8276403.html