Oracle Bba
Oracle Bba
Oracle Bba
PRIMARY KEY and the following fields name, designation, gender, age,
date of joining and salary. Insert at least 10 rows and perform various
queries using any one comparison, logical, set, sorting and grouping
operator.
AIM:
To create a table for employee details with different attributes such as name,
designation, gender, age, date of joining and salary. Set the employee number as primary
key and insert 10 rows for the employee table. Perform various queries using any one
comparison, logical, set, sorting and grouping operator.
ALGORITHM:
EMPNO NAME
-------------- -----------------
101 ANANDHI
103 CHITHRA
104 GAYATRI
107 NEHA
106 SISIRA
108 SEEMA
RESULT:
AIM:
To create tables for library management system such as master table and
transaction table, which demonstrate the use of primary key and foreign key. Create a
report with fields fees, account number, title and date of issue for the given date of return
with column format.
ALGORITHM:
AIM:
To create a PL/SQL to update the rate field by 20% more than the current rate in the
inventory table. Alter the number of item and place without any PL/SQL block.
ALGORITHM:
STEP 3-Create a table for inventory with attributes such as prono, proname and rate.
SQL>CREATE TABLE invent (prono number(5),proname varchar(10),rate number(4));
STEP 8 – Alter the inventory table by adding a column for ‘number of item’ and insert
values for the new field without using PL/SQL block.
SQL>ALTER TABLE invent ADD noofitem number(10);
STEP 9 – Insert value for the new field ‘number of item’ by using UPDATE statement.
SQL>UPDATE invent SET noofitem=10 WHERE prono=100;
AIM:
ALGORITHM:
STEP 3 – Create a table named ‘it’ with attributes such as regno, name,VB,
RDBMS, Total, Average and result with regno as primary key
SQL>CREATE TABLE it (regno number(10),name varchar2(10),VB
number(10),RDBMS number(10),tot number (10), avg float(10),result
varchar2(10),CONSTRAINT regno_pk PRIMARY KEY(empno));
STEP 4 – Insert values into the ‘it’ table using INSERT statement.
SQL>INSERT INTO it VALUES (®no,’&name’,&VB,&RDBMS);
STEP 7 – Enter the values for column ‘avg’ using UPDATE statement.
SQL>UPDATE it SET avg=tot/2 WHERE regno=101;
STEP 9 – Set ‘result’ as ‘P’ if the avg is greater than 40 and update the table.
SQL>UPDATE it SET result=’P’ WHERE avg>40;
STEP 10 - Set ‘result’ as ‘F’ if the avg is less than 40 and update the table.
SQL>UPDATE it SET result=’F’ WHERE avg<40;