随笔 - 633,  文章 - 0,  评论 - 13,  阅读 - 48万
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
SELECT * FROM `testdatas_inputtapinputtext` WHERE newaddandcheck_id=185 union all SELECT * FROM `testdatas_selecttapselectoption` WHERE newaddandcheck_id=185
联表查询 同一个newaddandcheck_id的 表 testdatas_inputtapinputtext中input_ele_find_value、
              表 testdatas_inputtapinputfile  中input_ele_find_value、
              表 testdatas_inputtapinputdatetime 中 input_ele_find_value
             表  testdatas_radioandreelectionlabel 中 label_ele_find_value
            表 testdatas_selecttapselectoption 中 select_ele_find_value
            表  testdatas_asserttiptext  中 tip_ele_find_value
            表  testdatas_iframebodyinputtext 中 iframe_ele_find_value
set @Id = 185;
SELECT input_ele_find_value FROM `testdatas_inputtapinputtext` WHERE newaddandcheck_id=@Id  union all
SELECT input_ele_find_value FROM `testdatas_inputtapinputfile` WHERE newaddandcheck_id=@Id   union all
SELECT input_ele_find_value FROM `testdatas_inputtapinputdatetime` WHERE newaddandcheck_id=@Id   union all
SELECT label_ele_find_value FROM `testdatas_radioandreelectionlabel` WHERE newaddandcheck_id=@Id  union all
SELECT select_ele_find_value FROM `testdatas_selecttapselectoption` WHERE newaddandcheck_id=@Id  union all
SELECT tip_ele_find_value FROM `testdatas_asserttiptext` WHERE newaddandcheck_id=@Id  union all
SELECT iframe_ele_find_value  FROM `testdatas_iframebodyinputtext` WHERE newaddandcheck_id=@Id;
 
内联:
set @Id = 185;
SELECT * FROM `testdatas_inputtapinputtext` inner join `testdatas_inputtapinputfile` on testdatas_inputtapinputfile.newaddandcheck_id = testdatas_inputtapinputtext.newaddandcheck_id 

一个字段多个值查询语言:
select input_ele_find_value from testdatas_inputtapinputtext where newaddandcheck_id in(165,179,180,181,182,183,184,185,186,187,188,189,190,191)
可以修改的:
select * from testdatas_inputtapinputtext where newaddandcheck_id in(165,179,180,181,182,183,184,185,186,187,188,189,190,191)     增加场景依赖输入框
带变量:
set @IdS1=165, @IdS2=179, @IdS3=180,@IdS4=181,@IdS5=182,@IdS6=183,@IdS7=184,@IdS8=185,@IdS9=186,@IdS10=187,@IdS11=188,@IdS12=189,@IdS13=190,@IdS14=191;
select * from testdatas_inputtapinputtext where newaddandcheck_id in (@IdS1,@IdS2,@IdS3,@IdS4,@IdS5,@IdS6,@IdS7,@IdS8,@IdS9,@IdS10,@IdS11,@IdS12,@IdS13,@IdS14)         增加场景-文本输入框
select * from testdatas_inputtapinputfile where newaddandcheck_id in (@IdS1,@IdS2,@IdS3,@IdS4,@IdS5,@IdS6,@IdS7,@IdS8,@IdS9,@IdS10,@IdS11,@IdS12,@IdS13,@IdS14)         增加场景-文件输入框
select * from testdatas_inputtapinputdatetime where newaddandcheck_id in (@IdS1,@IdS2,@IdS3,@IdS4,@IdS5,@IdS6,@IdS7,@IdS8,@IdS9,@IdS10,@IdS11,@IdS12,@IdS13,@IdS14)         增加场景-时间输入框
select * from testdatas_radioandreelectionlabel where newaddandcheck_id in (@IdS1,@IdS2,@IdS3,@IdS4,@IdS5,@IdS6,@IdS7,@IdS8,@IdS9,@IdS10,@IdS11,@IdS12,@IdS13,@IdS14)         增加场景-单选复选框
select * from testdatas_selecttapselectoption where newaddandcheck_id in (@IdS1,@IdS2,@IdS3,@IdS4,@IdS5,@IdS6,@IdS7,@IdS8,@IdS9,@IdS10,@IdS11,@IdS12,@IdS13,@IdS14)         增加场景-选项框
select * from testdatas_asserttiptext where newaddandcheck_id in (@IdS1,@IdS2,@IdS3,@IdS4,@IdS5,@IdS6,@IdS7,@IdS8,@IdS9,@IdS10,@IdS11,@IdS12,@IdS13,@IdS14)         增加场景-验证文本
select * from testdatas_iframebodyinputtext where newaddandcheck_id in (@IdS1,@IdS2,@IdS3,@IdS4,@IdS5,@IdS6,@IdS7,@IdS8,@IdS9,@IdS10,@IdS11,@IdS12,@IdS13,@IdS14)         增加场景-验证富文本
select * from testdatas_newaddandcheck where id in (@IdS1,@IdS2,@IdS3,@IdS4,@IdS5,@IdS6,@IdS7,@IdS8,@IdS9,@IdS10,@IdS11,@IdS12,@IdS13,@IdS14) 
 
 
 
 
 
 
 
 
posted on   大话人生  阅读(289)  评论(0编辑  收藏  举报
编辑推荐:
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
点击右上角即可分享
微信分享提示