Questions
- Create a table student with attributes sno,name marks and dept
- Add a new attribute age
- Change the datatype size of dept
- Delete the attribute marks from the table
- Change the name of the student table to students
- Delete all values from the table
- Delete the entire table
Solutions 👉 Query-1
Questions
- Create a table Employee with following specifications. Code character (4), name character (10), designation character(30), dob date, salary numeric.
- Insert 2 tuples into the table
- Select all details from the table.
- Change the salary of employee code is e1.
- Delete a tuple from the table employee
Solutions 👉 Query-2
Questions
- Create table employdetails with empid references to the empid in employee table
- Display the details of employee table where empid in employedetails table
- Display the details of employee table where empid notin employedetails table
Solutions 👉 Query-3
Questions
-
Create and insert values for the following tables department and instructor(with constarints)
-
Department table
- Code(primary key)
- Title
- Dept_name(unique)
- Dept_id
- Salary(check –salary>2000)
-
Instructor table
- Name(not null)
- Code
- Id(default)
-
Solutions 👉 Query-4
Questions
- Practice of SQL TCL commands like Rollback, Commit, Savepoint
- Create a table class. Fields are name and id
- Insert values into the table
- Display the table
- Apply commit, save point and rollback commands
Solutions 👉 Query-5
Questions
- Creation of Views and Assertions
- Create a table store. Fields are order no, code, item, quantity, price, discount, mrp
- Inset values into the table
- Display the table
- Create a view with item_name and quantity for the above table
- Write a query to check whether any changes made to present table is reflected in view.
- Write a query to delete a view
Solutions 👉 Query-6
Questions
- Implementation of Build in functions in RDBMS
- Create a table store. Fields are order no, code, item, quantity, price, discount, mrp
- Insert values into the table
- Display the table
- Write an SQL query to display the reminder, if the amount of an each item in store is divided by 9.
- Write SQL query to display the amount in store and its square
- Write SQL query to divide the amount in stock of each item by 7 in store table and display the result round to the nearest integer.
Solutions 👉 Query-7