简体   繁体   English

按列1值选择行以选择同一行的列2

[英]Select Row by Column1 Value to Select Column2 of same Row

I have a table like this: 我有一张这样的桌子:

id       count
23432    0
34242    1
12345    5
32235    20
45645    3

How can i select a ROW column(count) value 20 by the column(id) value 32235 ? 我如何通过column(id)值32235选择ROW列(计数)值20

I think this should be pretty straight-forward. 我认为这应该很简单。

SELECT `count`
FROM tablename
WHERE id = 32235

用这个:

SELECT * FROM table_name WHERE count = 20 && value=32235;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM