有a,b,c三个表,字段分别为
a:shopid,shopname,telephone
b:menuid,dish,price
c:rangeid,shopid,buildingid现在要求,当buildingid=1的时候列出shopname,telephone,dish,price四个字段
谢谢
a:shopid,shopname,telephone
b:menuid,dish,price
c:rangeid,shopid,buildingid现在要求,当buildingid=1的时候列出shopname,telephone,dish,price四个字段
谢谢
from a,b,c
where a.shopid = b.menuid and a.shopid = c.rangeid and c.buildingid=1这样可以么?
应该是:
有a,b,c三个表,字段分别为
a:shopid,shopname,telephone
b:menuid,shopid,dish,price
c:rangeid,shopid,buildingid现在要求,当buildingid=1的时候列出shopname,telephone,dish,price四个字段大家帮忙看看谢谢
from a,b,c
where a.shopid = c.shopid and b.shopid = c.shopid and c.buildingid=1