这样的查询语句怎么写?求助大家~~ select table1.id table1.title table1.nameid table2.name from table1, table2 where table1.nameid=table2.keyid 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 SELECT a.id,a.nameid,b.name,a.title FROM table1 a,table2 b WHERE a.nameid = b.keyid select a.id,a.title,b.namefrom table1 a,table2 bwhere a.nameid *= b.keyid select a.id,a.title,b.namefrom table1 a,table2 bwhere a.nameid *= b.keyid我感觉你是想要左查询的效果是么?否则就没有理由管这个问题叫问题 sql="select a.id,a.title as title,(select b.name from table2 as b where b.keyid=a.nameid) as name from table1 as a我是这样写的,行不行?我运行了一下,没问题,那个效率好一些呢? select a.id,a.title,b.namefrom table1 a left join (select distinct keyid,name from table2) table2on a.id=b.keyid 求SQL基础学习资料 三级分类下的商品查询问题 [请教高手]SQL语言加总问题_关于汇率对照问题 求一语句 sql server事务中语句报错后,事务实际状态测试总结,请看看是否正确? 行转列的问题,求救,急急急啊,望各位老大指教啊 SQL Server7.0安装问题 sql server中当主表记录删除时,从表的所有有关记录也要删除,触发器该如何写? 在ASP.net 增加﹐刪除﹐修改查詢SQL SERVER中的記錄﹐并要求帶有事務功能 挑战3++ ::大类商品分不同标志汇总问题。。。 在windows XP上装SQL Server的一个问题! 请教一个小问题,关于ODBC数据源的.
from table1 a,table2 b
where a.nameid *= b.keyid
from table1 a,table2 b
where a.nameid *= b.keyid
我感觉你是想要左查询的效果是么?否则就没有理由管这个问题叫问题
from table1 a left join
(select distinct keyid,name from table2) table2
on a.id=b.keyid