Professional Documents
Culture Documents
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> select
a.book_id,a.title,a.publisher_name,b.author_name,d.no_of_copies,f.programme_id from
book a,book_authors b,book_copies d,library_programme f where a.book_id=b.book_id
and a.book_id=d.book_id and f.programme_id=d.programme_id;
+---------+-------------------+--------------------+-----------------
+--------------+--------------+
| book_id | title | publisher_name | author_name | no_of_copies
| programme_id |
+---------+-------------------+--------------------+-----------------
+--------------+--------------+
| 101 | 2 States | Arihant publishers | Chetan Bhagat | 5260
| 1 |
| 102 | Godaan | Bandup books | Premchand | 4896
| 2 |
| 103 | Safed | Geeko books | Abhay verma | 8965
| 3 |
| 104 | Screwed by Murder | Penguin books | Saurabh Katyal | 6875
| 4 |
| 105 | Merry Christmas | Xpert books | Sriram Raghavan | 7896
| 5 |
+---------+-------------------+--------------------+-----------------
+--------------+--------------+
5 rows in set (0.00 sec)
mysql>
mysql>
mysql>
mysql>
mysql>
mysql>
mysql>
mysql>
mysql>
mysql>
mysql>
mysql>
mysql>
mysql>
mysql> delete from book where book_
-> ;
ERROR 1054 (42S22): Unknown column 'book_' in 'where clause'
mysql> delete from b
-> oo;
ERROR 1146 (42S02): Table '4mt21ai017_library.b' doesn't exist
mysql> delete from book where book_id=103;
Query OK, 1 row affected (0.01 sec)
mysql>