Mysql
table1
-------+-------
goods iphone8
-------+--------
price 29900
table2
-------+-------
goods iphone8
-------+--------
price 19900
引用:
select goods,price from table1 where (goods in(select goods from table2) and price in (select price from table2))
|
以table1數據為基礎下
我要找出 在table1.goods 等於 table2.goods 商品,條件是 price 也相同 ,我用上面語法執行後結果有值
goods 是 text
price 是 text
select where in的用法能像我這樣用嗎? 該怎樣用?