数据表结构
id name usertype 其中usertype为用户类型 1为个人 2为企业怎么让他在数据库控件中这样显示
name 个人用户 企业用户
登录积分 1 2
注册积分 3 5
.......
id name usertype 其中usertype为用户类型 1为个人 2为企业怎么让他在数据库控件中这样显示
name 个人用户 企业用户
登录积分 1 2
注册积分 3 5
.......
解决方案 »
- 怎么样在Win2008 R2的环境里面配置支持ASP.Net4.0 WebForm的路由。
- AccessDataSource的参数问题
- 请教个简单的绑定问题。。
- 急,FCKEditor自动换行求助--》
- asp.net2.0session丢失问题,上传到服务器后只能保存5秒,本机测试没问题
- 哪个网站管理系统支持的视频格式丰富?
- vs2005中,两个页面间调用的问题?
- 怎么能在IE关闭同时关闭由C# playsound循环播放的音乐
- windows控件和web控件的区别???
- 不能忍受了,我把程序贴出来,大家帮我看看,(上载word文档到sql server image字段后,因为某些中文名字,文件不能被下载)
- 请问这样做是否有问题,完成后会把StreamReader关闭吗?
- 请教下gridview中的HyperLinkField列如何取值。。谢谢了。
select a.name,a.,b. from
(
select *
from
where usertype=1
)a,
(select *
from
where usertype=2
)b
where a.name=b.name试试这个
select name,sum(case usertype when 1 then else 0 end) as 个人用户,sum(case usertype when 2 then else 0 end) as 企业用户 from Table group by name