日期:2014-05-16  浏览次数:20462 次

怎么从表A中取出的数据到表B中区比较然后取出相应的字段
表一                                                                 表二
value       Record_ID    Riskfactor             Riskfactor              Value_Min             Value_Max             Suggention            
15                 20                  1                               1                          1                              10                        **************
8                    21                  2                              1                         11                             20                    **************       
23                 22                   3                              1                         21                               30                      **************

如上所示,怎么根据传进来的Record_ID值,取出valve值然后到表二中去比较取出对应的suggestion

------解决方案--------------------
我看你表二的信息应该就是这个意思吧!
select Suggention from 表二 
where (select value from 表一 where Record_ID=8)&nb