I have a table like: called BOOKS
+------+-------------------+---------------+
| id | book_title | author |
+------+-------------------+---------------+
| 1 | learning mysql | 1234 12 |
+------+-------------------+---------------+
| 2 | learning php | 125 50 |
+------+-------------------+---------------+
And i want a VIEW
from BOOKS and AUTHOR:
+------+-------------------+
| id | author |
+------+-------------------+
| 12 | JOHN |
+------+-------------------+
| 50 | PAUL |
+------+-------------------+
| 125 | CHRISTOPHER |
+------+-------------------+
| 1234 | PATRICK |
+------+-------------------+
So that i can have a VIEW which i should be something like the table which is below but should show instead of author id author name from tabel AUTHOR.
+------+-------------------+-----------------------------------+
| id | book_title | author |
+------+-------------------+-----------------------------------+
| 1 | learning mysql | PATRICK |
+------+-------------------+-----------------------------------+
| 1 | learning mysql | CHRISTOPHER |
+------+-------------------+-----------------------------------+
| 2 | learning php | JOHN |
+------+-------------------+-----------------------------------+
| 2 | learning php | PAUL |
+------+-------------------+-----------------------------------+