![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
MSSQL
mingyangsun
这个作者很懒,什么都没留下…
展开
-
SQL脚本创建表
if exists(select * from sysobjects where name=atzk)--判断是否存在此表drop table atzkgocreate table atzk( nid int identity(1,1) primary key,--nid自动编号,并设为主键。 mytitle varchar(50) not null,--通知的标题。 myconte原创 2010-01-24 15:28:00 · 5249 阅读 · 1 评论 -
sql count函数统计
<br />使用COUNT(统计)函数<br />COUNT函数用于返回组中项目的数量。一般情况下,COUNT函数主要用于查询结果中的数据记录数,因此通常以通配符“*”作为COUNT函数的参数。<br />语法:<br />COUNT({[ALL | DISTINCT]expression} | *)<br />参数说明:<br /> ALL:为默认设置,如果没有参数,SQL Server对所有的值进行聚合函数运算。<br /> DISTINCT:指定COUNT返回惟一非空值的数量。<br /> expre原创 2010-10-25 13:08:00 · 3126 阅读 · 0 评论