select语句的编写 select * from P_Tree where parentid=@parentidand (endstation = 真 and "在power中") 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 对不起补充一下,power中的formname应为nodename select * from P_Tree where parentid=@parentidor (endstation = 1 and "在power中") select * from P_Tree where parentid=@parentidand (endstation=0 or (endstation=1 and exists(select 1 from power where formname=p_tree.nodename))) To:txlicenhe(马可) 需要判断endstation,如果为真的时候才去比较nodename是否存在于power中的formname中,如果为假则不需要去判断 关于字段为空的比较问题 求条SQL语句 谢谢 分类汇总按条件 请教一个问题?这个字段为什么不能设置“不能为空”? 如何sql语句将二维表结构的数据转化为一维的 excel 数据导入 sql 2000时间发现有些字段为空.如何在导入时将默认为float的数据类型转化成nvarchar. 求一超难的sql语句!!! sql server数据库连接问题? 请问NULL值有什么好处?谢谢! 一个可能比较简单的更新语句的问题:分组求和,然后根据求和结果更新 谁知道把SQL表里的简体数据转换成繁体字? 这是什么错误?高手赐教
or (endstation = 1 and "在power中")
and (endstation=0 or (endstation=1 and exists(select 1 from power where formname=p_tree.nodename)))
需要判断endstation,如果为真的时候才去比较nodename是否存在于power中的formname中,如果为假则不需要去判断