我有 2 张 table
表A
Question|Answer
-------------------
a | y
表B
Type | Question
------------------
3 | a
---------------
1 | b
如何通过查看表 B 来检查问题 A 属于表 A 中的什么类型? 我想检查表 A 中的问题 a 是否属于类型 3(执行此操作),如果它是类型 1(执行此操作) 找不到正确的查询
maybe Select type from table B where tableA.question = tableB.question
最佳答案
SELECT b.Type FROM TableA a, TableB b WHERE a.Question=b.Question
关于php - 如何比较来自同名mysql的不同表的值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27086368/