[go: up one dir, main page]

0% found this document useful (0 votes)
7 views3 pages

Program3 Rdbms

The document outlines the creation of an Employee table with specified fields and provides SQL queries for various operations. It includes instructions for inserting records, displaying maximum salary, filtering salaries above 10,000, retrieving addresses from Chennai, and listing employees by specific designations. Sample outputs for each query are also provided, demonstrating the results of the executed SQL commands.

Uploaded by

praveenkd08
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views3 pages

Program3 Rdbms

The document outlines the creation of an Employee table with specified fields and provides SQL queries for various operations. It includes instructions for inserting records, displaying maximum salary, filtering salaries above 10,000, retrieving addresses from Chennai, and listing employees by specific designations. Sample outputs for each query are also provided, demonstrating the results of the executed SQL commands.

Uploaded by

praveenkd08
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

3.

CREATE AN EMPLOYEE TABLE WITH THE FOLLOWING FIELDS AND


PERFORMING QUERIES.

Create an Employee table with the following fields and performing queries.
Field name Field type Size
Emp no number 20
Emp Name varchar 15
Department Number varchar 20
Designation character 10
Address varchar 5
Salary number 10
a) Insert the value and Display the records.
b) Display the maximum amount of Salary.
c) Display all the details of the Salary whose Salary greater than 10000.
d) Display the details of the Address who are from Chennai
e) List the names of Employee whose designation are Analyst, Salesman and
developer

1.Insert the value and Display the records


create table employe1(eno number(10),enamevarchar(20),deptnonumber(5),designation
varchar(20),address varchar(20),salary number(10));

insert into employe1 values(16,'hema',107,'salesman','coimbatore',45000);

2.Display the maximum amount of Salary


select * from employe1;
b)select max(salary) from employe1;

3.Display all the details of the Salary whose Salary greater than 10000
c)select * from employe1 where salary >10000;

4.Display the details of the Address who are from Chennai


d)select * from employe1 where address ='chennai';

5.List the names of Employee whose designation are Analyst, Salesman and developer

e )select * from employe1 where designation in (developer','salesman','hod');


OUTPUT
1.Insert the value and Display the records

ENO ENAME DEPTNO DESIGNATION ADDRESS SALARY

10 hari 101 hod chennai 30000


11 karthi 102 assistatprof chennai 25000
12 kavin 103 professor trichy 25000
13 kalai 104 professor eorde 15000
13 vani 104 professor salem 10000
14 jamuna 104 lecturer salem 80000
14 jamuna 104 analyst chennai 80000
15 kavin 106 developer erode 70000
15 kumar 106 salesman erode 40000
16 hema 107 salesman coimbatore 45000
2.Display the maximum amount of Salary

MAX(SALARY)
80000

3.Display all the details of the Salary whose Salary greater than 10000

NO ENAME DEPTNO DESIGNATION ADDRESS SALARY


10 hari 101 hod chennai 30000
11 karthi 102 assistatprof chennai 25000
12 kavin 103 professor trichy 25000
13 kalai 104 professor eorde 15000
14 jamuna 104 lecturer salem 80000
14 jamuna 104 analyst chennai 80000
15 kavin 106 developer erode 70000
15 kumar 106 salesman erode 40000
16 hema 107 salesman coimbatore 45000

4.Display the details of the Address who are from Chennai


ENO ENAME DEPTNO DESIGNATION ADDRESS SALARY
10 hari 101 hod chennai 30000
11 karthi 102 assistatprof chennai 25000
14 jamuna 104 analyst chennai 80000

5.List the names of Employee whose designation are Analyst, Salesman and developer

ENO ENAME DEPTNO DESIGNATION ADDRESS SALARY


10 hari 101 hod chennai 30000
15 kavin 106 developer erode 70000
15 kumar 106 salesman erode 40000
16 hema 107 salesman coimbatore 45000

You might also like