Professional Documents
Culture Documents
DBMS Uday
DBMS Uday
Loyola Academy
Degree & PG College
OLD ALWAL,SECUNDERABAD - 500010
[AN AUTONOMOUS DEGREE COLLEGE AFFILIATED TO OSMANIA UNIVERSITY]
‘A college with potential for excellence’ by UGC. Re-accredited with GRADE ‘A’ by NAAC
Department of
B.COM HONOURS
Certificate
This is to Certify that this is a BONAFIDE RECORD of the work done
in the “DATABASE MANAGEMENT SYSTEMS” lab during the 3RD YEAR
/5TH SEMESTER in the academic year
2023-2024.
INDEX
S.NO CONTENT PAGE DATE SIGN
NO.
1.) Write a query to 5
create a table using
appropriate data
type.
4.) 6
Write a query to select or display only
selected column.
6.) 7
Write a query to create a table from another
table by specifying a condition
8.) 8
Write a query to update selected content in a
table.
SET OPERATIONS
4
AGGREGATE FUNCTIONS
15.) Write a query to perform COUNT aggregate 13
function.
SCALAR OPERATIONS
20.) Write a query to perform UPPERCASE Scalar 16
Function.
CONSTRAINS
27.) 20
Write a query to perform NOT
NULL(under domain constraint) as a
constraint.
28.) 21
Write a query to perform CHECK
(under domain constraint) as a
constraint.
29.) 21
Write a query to perform KEY
constraint
CREATING TRIGGERS
34.) Write a query to perform TRIGGER. 25
CREATING PROCEDURES
35.) Write a query to perform PROCEDURE. 26
6
2) Write a query to insert data into table & display the table.
SQL> insert into DCH
values(26,’Swetha’,’Hyd’,’swetha@gmail.com’); SQL> insert into DCH
values(25,’Priya’,’SEC’,’Priya@gmail.com’); SQL> insert into DCH
values(24,’Anjali’,’NZB’,’anjali@gmail.com’); SQL>Select*from DCH;
OUTPUT:
7
3) Write a query to display distinct values or unique values from the table.
OUTPUT:
9
OUTPUT:
SET OPERATIONS:
To perform set operations, you need two
tables. Table1:
12
Table2
OUTPUT:
OUTPUT:
14
AGGREGATE FUNCTIONS:
To perform Aggregate functions, you need only one
table. Table1
OUTPUT:
15
OUTPUT:
OUTPUT:
16
OUTPUT:
OUTPUT:
17
SCALAR OPERATIONS:
To perform SCALAR OPERATIONS, you need only one table.
OUTPUT:
OUTPUT:
CONSTRAINS:
1) Write a query to perform NOT NULL(under domain constraint) as a
constraint.
SQL> Create table QCH(ID int primary key not null,Name char(10) NOT
NULL,Address char(10),Email char(20));
iNSERT INTO QCH VALUES(1,’Anjali’,'HYD','ANJALI@GMAI.COM');
Select*FROM QCH;
OUTPUT 1:
OUTPUT 2:
22
JOINS:
To perform different types of JOINS, you need two tables.
Customer Table:
24
Order Table:
CREATING TRIGGERS:
To perform TRIGGER, you need ONLY ONE table.
CREATING PRODECURE:
To perform PROCEDURE, you need ONLY ONE
table. CUSTOMER:
OUTPUT:
28
THE END
29
30