读书人

从多个表中查询,多谢各位帮忙

发布时间: 2012-03-02 14:40:28 作者: rapoo

从多个表中查询,谢谢各位帮忙
问个问题..从多个表中查询,,比如有两个表,,一个是product,一个是news,都从两个表中查询相同条件,,该怎样?
sql= "select top 10 * from product order by id desc , news where fatherID=3 "
我这样做提示是错的...请各位大哥大姐帮一手..谢了

[解决办法]
select top 10 * from product,news where product.ID=news.id
[解决办法]
SELECT a.*,b* FROM [product] a inner join [news] b on a.id=b.id

读书人网 >ASP

热点推荐