易截截图软件、单文件、免安装、纯绿色、仅160KB

【SOS】 MSSQL数据库问题 - MS-SQL Server / 疑难问题

select id,name,type from A union all 
select id,name,type from B union all 
select id,name,type from C union all where ???
----------------------------------------------------
 1,张三,会员
 2,李四,钻石
 7,王五,普通
 3,张三,会员
 5,张三,会员
---------------------------------------
 查询时 “会员” 的用户列 
  Where 后面怎么写。。。
  type='会员' 不行


成功后 即结贴。。。。。。。。。。。。。

A.type = '' or B.type='' or C.type=''


先结帖再试吧

引用
A.type = '' or B.type='' or C.type=''

  都要写吗?
  我又多张表

SQL code:
select id,name,type from A where [TYPE]='会员'
union all
select id,name,type from B where [TYPE]='会员'
union all
select id,name,type from C where [TYPE]='会员'


select * from(
select id,name,type from A union all  
select id,name,type from B union all  
select id,name,type from C) t where type='会员'

引用
SQL code
SELECT * from (
select id,name,type from A union all
select id,name,type from B union all
select id,name,type from C
)T where [TYPE]='会员'

  T是


相关问答:

jsp链接sql2000的疑问?



type Exception report


message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jas ......

求一SQL - MS-SQL Server / 基础类

tab1 字段:billdate,goodsid,incount,inmoney,outcount,outmoney,endprice,endcount,endamt
tab2 字段:goodsid,goodskind(商品类型)
tab3 字段:goodskind(商品类型),kindname
结果:
得到商品类型在一段时间 ......

请教SQL语句查询问题? - MS-SQL Server / 基础类

我想查询出每天数据的最大的一个值。表的格式如下
表名: hisdata
字段 编号 值 状态 时间  
  Id value state dattime  
  101 32.3 0 ......

sql语句问题 - MS-SQL Server / 疑难问题

现在有一个部门表dept(部门名称,部门号。。)有一个人员表emp(姓名,人员编号,职位,薪资,部门)
emp表中的内容是这样的:
a 1 工程师 3000 软件部
b 2 普通员工 2000 硬件部
c 3 工程师 4000 硬件部
d ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号