DBMS Lab Experiments
DBMS Lab Experiments
Expected Output:
Table created.
Table altered.
Table dropped.
Database Management System Laboratory
Expected Output:
1 row inserted.
1 row updated.
1 row deleted.
Database Management System Laboratory
Expected Output:
SELECT * FROM Students WHERE Age > 18 AND Age < 25; -- Logical
SELECT Name FROM Students UNION SELECT Name FROM Teachers; -- Set
Expected Output:
Expected Output:
Joined tables.
Database Management System Laboratory
SELECT Age, COUNT(*) FROM Students GROUP BY Age HAVING COUNT(*) > 1;
Expected Output:
CREATE VIEW young_students AS SELECT * FROM Students WHERE Age < 22;
Expected Output:
CREATE TABLE Students (ID INT PRIMARY KEY, Name VARCHAR(50) NOT NULL, Age INT CHECK (Age
>= 18));
Expected Output:
START TRANSACTION;
SAVEPOINT sp1;
ROLLBACK TO sp1;
COMMIT;
Expected Output:
Expected Output:
DECLARE
v_name VARCHAR(50);
BEGIN
DBMS_OUTPUT.PUT_LINE(v_name);
END;
Expected Output:
Expected Output:
Trigger created.