Users | ||
userID | Name | Age |
1 | James | 20 |
2 | Tom | 18 |
Bag | |
userID | bookID |
1 | A001 |
1 | A002 |
2 | A001 |
Author | ||
bookID | bookName | bookAuthor |
A001 | Thinking in Java (4th Edition) | Bruce Eckel |
A002 | Java Black Book | Steve Holzner, Steven Holzner |
select * from Users join Bag on Users.UserID = Bag.UserID
番茄 是 inner join 还是 left join 比较 ...
goodday 发表于 2010-6-13 06:55 PM
应该是要看user的要求吧。
1)inner join只能看到有带书的user
2)left outer join是看完所有的user不 ...
AhPang 发表于 2010-6-13 10:46 PM
select * from Users join Bag on Users.UserID = Bag.UserID
番茄 是 inner join 还是 left join 比较 ...
goodday 发表于 2010-6-13 06:55 PM
欢迎光临 JBTALKS.CC (https://jbtalks.my/) | Powered by Discuz! X2.5 |