gpt4 book ai didi

mysql 从列名等于的表中选择

转载 作者:行者123 更新时间:2023-11-30 23:04:19 24 4
gpt4 key购买 nike

我有一个简单的表格

amps | 120-240 | 120-208 | 277-480__________________________________10   |  $99.00  | $149.00 | $344.0020   | $199.00 | $298.00 | $688

I want a query something like this but I can't get it to work ...

select * from `table` where amps like '10' and column_name like '120-208';

select * from `table` where amps like '20' and column_name like '277-480';

请帮忙!也许我忽略了一种更简单的设置方法?

谢谢!

最佳答案

就这样?

SELECT `120-208` FROM table WHERE amps = '10'

关于mysql 从列名等于的表中选择,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22510757/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com