sql联合查询问题
有两个表.一个a表:字段是:cid(主键),nama,intro,sum
一个b表:字段是:id,address,cid(外键)
现在我用gridview显示出出:cid,name,intro,sum,address
请问这个sql语句怎么写?
没分了!不好意思了!
谢谢
[解决办法]
select a.cid, a.name, a.intro, a.sum, b.address from a inner join b on a.cid = b.cid
[解决办法]
select a.cid, a.[name], a.intro, a.[sum], b.address from a inner join b on a.cid = b.cid