DBMS Experiments (1 - 18)
DBMS Experiments (1 - 18)
DBMS Experiments (1 - 18)
1
Implement DDL Command
DDL : It is used to create database or its objects(like- Table, Index, Function, View, Store,
Procedure and Triggers).
Experiment No.2
2. Foreign Key –
Experiment No.3
Implement DML Command
Experiment No.5
Implement Agreegate Functions
Agreegate Functions are -
2. Max -
3. Min –
5. Count –
Experiment No.6
2. LIKE –
3. Group By –
Experiment No.7
Write a query to display Alternate Rows(Odd & Even)
2. Even –
Experiment No.8
Write a query to update multiple records using one update statement
Experiment No.10
Write a query to display the name which start with alphabate 'G'
The INSERT command can also take the values directly from another table using 'SELECT'
statement rather than giving the values for each column. Through 'SELECT' statement, we can
insert as many rows as the base table contains.
Syntax:
BEGIN
INSERT INTO <table_name>(<column1 >,<column2>,...<column_n>)
VALUES(<valuel><value2>,...:<value_n>);
END;
Syntax:
BEGIN
UPDATE <table_name>
SET <columnl>=<VALUE1>,<column2>=<Yalue2>,<column_n>=<value_n>
WHERE <condition that uniquely identifies the record that needs to be update>;
END;
Syntax:
BEGIN
DELETE
FROM
<table_name>
WHERE <condition that uniquely identifies the record that needs to be update>;
END;
To execute SQL statements, a work area is used by the Oracle engine for its internal
processing and storing the information. This work area is private to SQL’s operations. The
‘Cursor’ is the PL/SQL construct that allows the user to name the work area and access the
stored information in it.
Declare Cursor: A cursor is declared by defining the SQL statement that returns a result set.
Open: A Cursor is opened and populated by executing the SQL statement defined by the cursor.
Fetch: When the cursor is opened, rows can be fetched from the cursor one by one or in a block to perform
data manipulation.
Close: After data manipulation, close the cursor explicitly.
Deallocate: Finally, delete the cursor definition and release all the system resources associated with the
cursor.