【sql】比較兩列數據

select testcode,testvalue,procode,provalue,testresult from (select test.PARAM_NAME testcode, test.result testresult, test.PARAM_VALUE testvalue,pro.param_name procode,pro.param_value provalue


from `xixi`.`t_common_global_param` test, `xixi_backup`.`t_common_global_param` pro


where test.PARAM_NAME= pro.PARAM_NAME) haha


 where testvalue in (select provalue from (select test.PARAM_NAME testcode, test.PARAM_VALUE testvalue,pro.param_name procode,pro.param_value provalue


from `xixi`.`t_common_global_param` test, `xixi_backup`.`t_common_global_param` pro


where test.PARAM_NAME= pro.PARAM_NAME) haha where provalue is not null)
發佈了64 篇原創文章 · 獲贊 18 · 訪問量 5萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章