哦,我写的有问题父id为‘a’。
解决方案 »
- sqlserver溢出,超过了其中最大的整数值。
- 用SQL查询语句使查询结果横着显示问题。。。
- Windows 2003新装,安全设置太高,登录CSDN时校检码图片不显示,应改IE的哪项?
- 一个有关存储过程的问题?
- 无法脱机
- 向各位高手请教一个问题????
- 怎样将一个表中查旬到的纪录插入到另一个表中
- SQL server2005数据库还原问题。。。。。。
- RecordSet的机制怎样的,能不能将他的缓冲区容量设大些
- 标量值函数怎么写?
- 错误409: assignment operator 运行不能以 ntext 数据类型作为参数。为什么 我改参数为 @NewsContent ntext OUTPUT 时报错呢?
- 关于数据库的增长
declare @b table(id varchar(10),业绩 int)
insert @a
select 'a','a' union
select 'b','a' union
select 'c','a' union
select 'd','a'
insert @b
select 'a',5 union
select 'b',5 union
select 'c',5 union
select 'd',5 --查询
select count(id) as '人数'
from @b
where id in (select id from @a where 父id = 'a')
and 业绩 >= 5--结果
/*
人数
-----------
4(1 row(s) affected)
*/