TO DOWNLOAD THE SAMPLE LİBRARY DATABASE CLICK
Example 1: List all student’s name,surname,book’s name and the borrow’s taken date.(three table)
1 2 3 4 5 |
Select students.name,surname,books.name,takendate from students,borrows,books where students.studentId = borrows.studentId and books.bookId = borrows.bookId |
The Result Of Query:
6308 rows listed.
Example 2: List all student’s name,surname,book’s name,autor name and the borrow’s taken date.(four table)
1 2 3 4 5 6 |
Select students.name,students.surname,books.name,authors.name,authors.surname,takendate from students,borrows,books,authors where students.studentId = borrows.studentId and books.bookId = borrows.bookId and authors.authorId = books.authorId |
The Result Of Query:
6308 rows listed.
Example 3:List all book’s name,book’s author name,book’s author surname and book’s type name.
1 2 3 4 5 |
Select books.name as BookName,authors.name as AuthorName,authors.surname as AuthorSurname,types.name as BookType from books,authors,types where books.authorId = authors.authorId and books.typeId = types.typeId |
Result of Both Queries:
YOU MAY WANT TO SEE OUR ALL EXAMPLES PAGE, THEN CLICK HERE
168 rows listed.