SQL server查询 表结构 name,code,sex; xxx , 1000, m yyy , 1001, w zzz , 1002, m我要查询,如果xxx的sex 等于 zzz的sex就返回真,否则返回假,SQL server有没有这样功能? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 if (select count(distinct sex) from tb where code=1000 or code=1002 )=1print '真'else print 'false' if exists(select 1 from tb m ,tb n where m.name = 'xxx' and n.name = 'zzz' and m.sex = n.sex ) print 'true'else print 'false' select case A.sex = B.sex the 1 else 0 endfrom tb A,tb Bwhre A.name='xxx' and B.name='zzz' if exists(select 1 from tb a ,tb b where a.name = 'xxx' and b.name = 'zzz' and a.sex = b.sex)pritn '一样' 求助SQL 语句 关于group by的一个问题,在线等 为何有的进程会阻塞自己?? 请教一个简单的SQL语句写法,谢谢~ 如何将表中数据从一个表复制到另一表???????表结构不一样……………… 远程连接sql数据库问题,谢谢, sql server 安装 用一条sql查按id排序去除头3条尾4条的中间部分纪录。 请问这个任意将execl导入到数据库中的程序该怎么写? 又是一个菜鸟问题,各位大侠请了. 根据存储过程的名字找到属于哪个库? sql2005新建字段的时候,字段类型为 boole 类型,应该要选什么类型才行呢?
print '真'
else
print 'false'
print 'true'
else
print 'false'
from tb A,tb B
whre A.name='xxx' and B.name='zzz'
pritn '一样'