VC数据库编程,数据表访问问题?

来源:百度知道 编辑:UC知道 时间:2024/05/31 22:56:14
新建的数据库lingshou里有两个表,lspInfo,lsTongji。两个表中有共同的列表----商品名。lspInfo,里的商品名对应的有一个列名是“种类”,lsTongji里没有种类这个域。

现在我要访问lsTongji数据表。并根据lspInfo里的商品种类来刷选。

如下的访问语句,哪点错了。执行错误。

select lsTongji.商品名,lpTongji.单价 from lsTongji,lspInfo WHERE lpTongji.商品名=lspInfo.商品名 and lspInfo.种类=‘饮料‘;

哪点错了。帮我改改。

根据格式上来看没有错误,
因为我这有一个例子这样写可以成功,
select a200908g.card_number,a200908g.car_plate from a200908g,car_info where a200908g.card_number = car_info.card_number and car_info.car_color = '黄色'
我想是你的登陆用户的权限有问题,或者使用的连接有问题,如果方便的话可以给我发过来帮你看看

from lsTongji left join lspInfo