0% found this document useful (0 votes)
14 views

Lab Report 3 Final

dbms lab report

Uploaded by

it22016
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Lab Report 3 Final

dbms lab report

Uploaded by

it22016
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Mawlana Bhashani Science and Technology University

Santosh, Tangail-1902

Department of Information and Communication Technology

Lab Report 03
Course Title: Database Management System Lab
Course Code: ICT-2108
Lab Report on: Different Types of SELECT Operations in MySQL

Submitted By Submitted To

Name: Md. Faim Montasir Dr. Md. Abir Hossain


ID: IT-22016 Associate Professor,
2nd Year, 1st Semester Dept. of ICT, MBSTU
Session: 2021-2022
Dept. of ICT, MBSTU

Date of Performance: 12-03-2024 Date of Submission: 19-03-2024


Experiment No: 03
Experiment Name: Basic query of MySQL.

Objectives:
The main objective of this experiment is to use some basis query of MySQL. We will
learn how to show different attributes from database and also learn how arithmetic
expressions work in database.
Required Instruments :
1. MySQL 8.3 Command line Client.

Find the names of all instructors:


SQL expression: select name from instructor;

Find the department names of all instructors:


SQL expression: select dept_name from instructor;
Find the distinct department names of all instructors and find all department names of all
instructors. SQL expressions are mentioned on the screenshot below:
The select clause may also contain arithmetic expressions involving the operators +, −, ∗,
and / operating on constants or attributes of tuples.

For example, the query: Find ID, name, dept_name and salary with 10% bonus of all
instructors:
SQL expression: select ID, name, dept_name, salary *1.1 from
instructor;

Find the names of all instructors in the ICT department who have salary greater than 30,000:
SQL expression:
select name from instructor where dept_name=”ICT” and salary>30000;
Find the names of all instructors, along with their department names and department building
name.
SQL expression:
select name, instructor.dept_name, building from instructor,
department where instructor.dept_name=department.dept_name;

Discussion:
By the above selection query, we can easily find our desire output. We can also use
arithmetic expression to calculate something and display records as per our expectations.

You might also like