SQL Practical Lab File
SQL Practical Lab File
College
B.C.A. III Semester
SQL Practical Lab File
NOTE:-Write your Name, Roll No, Class, Section, Subject with Paper Code on first page of
Practical File. Prepare an Index (S. No, Name of Query, Date, Page No, Remarks) on
second Page of Practical File.
1) Add primary key constraint on book_id attribute of relation books and also on m_id attribute
of relation members.
2) Add foreign key constraint to relation book_issued where book_id references to book_id of
books and member_id references to m_id of members.
3) Write a query to modify the phone number whose member_id is 5510.
4) Write a query to add Not Null constraint on attribute b_name.
5) Modify the author field of relation books , change its data type to char(30).
6) Add a new attribute named ‘Publisher’ to relation books.
7) Delete field phone from relation member.