asp中多表查询代码
asp中多表查询代码,两张表Book和Bo_book,要查询Book表中的book_name、book_write和book_num还有Bo_book表中的bo_bada...
asp中多表查询代码,两张表Book和Bo_book,要查询Book表中的book_name、book_write和book_num还有Bo_book表中的bo_bada,代码要怎么写?帮帮忙
帮帮忙,急用呢,谢谢! 展开
帮帮忙,急用呢,谢谢! 展开
1个回答
展开全部
2表什么关系?如果没关系就不用查询了?
假定Book.id=Bo_book.bookId
select Book.book_name as book_name,Book.book_write as book_write,Book.book_num
as book_num,Bo_book.bo_bada from Book left join Bo_book on Bo_book.bookId=Book.id
假定Book.id=Bo_book.bookId
select Book.book_name as book_name,Book.book_write as book_write,Book.book_num
as book_num,Bo_book.bo_bada from Book left join Bo_book on Bo_book.bookId=Book.id
更多追问追答
追问
Book表是书的表,Bo_book是借书信息,我是想做还书的功能,所以要把归还日期取出来
、
可不可以快一点,我感觉你肯定会。这个问题已经困扰我好几天了,好不容易看到希望了,拜托啦!
追答
关键是2个表有什么联系,上面我已经把查询语句给你了嘛
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询