Sample Practical File
Sample Practical File
Sincerely,
5. Delete Data:
Deletes a student record with a specific ID from the "Students"
table using the DELETE command.
6. Retrieve Data:
Fetches all records from the "Students" table using the SELECT
statement.
7. Filter Data:
Retrieves records from the "Students" table where the grade is 'A'
using the SELECT statement with a WHERE clause.
8. Sort Data:
Retrieves all student records from the "Students" table and sorts
them in descending order based on age using the ORDER BY clause.
9. Aggregate Functions:
Calculates the average age of all students in the "Students" table
using the AVG aggregate function.
10. Joins:
Retrieves information from both the "Students" and "Marks" tables
by performing an INNER JOIN based on the common "StudentID"
column.
11. Subqueries:
Retrieves the first name and age of students whose age is greater
than the average age of all students, using a subquery.
12. Views:
Creates a view named "HighScorers" that includes all records from
the "Marks" table where the marks are greater than 90.
13. Transactions:
Starts a transaction, updates the age of a student, and commits
the transaction to make the change permanent.
14. Indexing:
Creates an index named "idx_LastName" on the "Students" table to
optimize searches based on the "LastName" column.
2. Initialize a Variable:
3. Print Statement:
5. Loop
6. Array Declaration:
7. Array Initialization:
8. Array Traversal:
Input for Array Declaration, Initialization, Traversal Statement
9. Function Declaration:
10. Function Call: