Professional Documents
Culture Documents
DDL:
1. Write a SQL statement to create a simple table countries including columns
country_id,country_name and region_id.
3. Write a SQL statement to create a simple table students including columns student_id,
student_name and dept.
4. Add a column date of join to the students table(use data type as date)
5. Write a SQL statement to create a simple table employees including columns emp_id,
emp_name and designation.
Constraints
1. Create the following tables with all given constraints
2. Create the primary key and foreign key constraints using alter command
3. Create all unique constraint using table level constraints
4. Delete all unique constraints using alter command
Bus:
1.
2.
3.
4.
Reservation
1.
2.
3.
4.
Ticket
1.
2.
3
4.
Passenger
2.
3.
4.
Cancellation:
1.
2.
3.
4.
DML
1. Insert 2 rows into the book table and display result table
2. Insert 2 rows in to the book table with same authorname and display
result table
3. Insert 2 rows with values only for book name and author name(use
appropriate syntax) and display result table
4. Increase the price of all books by rs.100 and display result table
6. Display the details of books having price between 400 and 2000
9. Increase the quantity of book1(the first row book data in the table) by 10
and display result table