求多表查询语句
表user:
id: 1
name:a
表x:
id: 1 2
user_id: 1 1
x: 56 23
如何查询:name,x呢?
select name,x
from user,x
where user.id=user_id and user.id=1
是否正确?
[解决办法]
select name,x
from user,x
where user.id=x.user_id and user.id=1
少了x.