0% found this document useful (0 votes)
25 views5 pages

Practical No 7 DBMS

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

Practical No 7 DBMS

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

Practical No.

7:- Execute SQL Commands Queries Using String, arithmetic, Date


and Time, Aggregate Functions.
Name:-Deepak Yadav
Roll No:-220463
Q.1] Write Output of the Following Queries:-

a) Select abs(-15) from dual;

b) Select exp(4) from dual;

c) Select power(4,2) from dual;

d) Select mod(10,3) from dual;

e) Select sqrt(16) from dual;


Q.2] Write Output of the following queries:
a) Select concat(‘Shreyas’,’ NBA’) from dual;

b) Select ltrim(‘shreyasss',’s’) from dual.

c) Select rtrim('shreyasss,’s’) from dual,

d) Select lower( ‘SALES’) from dual;

3. Write Output of the following queries:


1.Select sysdate from dual;

2. Select next_day(sysdate,’ thur’) from dual;


3. Select add months(sysdate,2) from dual;

4. Select last_day(sysdate) from dual;

5.Select months_between(sysdate,hiredate) from Emp;

Exercise Questions:-
Q.1] Write SQL Queries For the Following:-
a. Display information of employees whose salary is greater than average
salary of all employees.
b. Display total employees in sales department with its location

c. Display maximum and minimum salary of employees.

d. Display total salaries of employees working in production department with


Dept_no and location of department.

e. List the employees with hiredate in format ‘Jan 19 2000’.

f. Display the difference in joining dates of employee Ashish and Shreyas.


Q.2] Write Output of the following Queries:-
a. Select upper(‘production’) from dual;

b. Select length('Sales') from dual;

c. Select substr(‘production sales’,3,4) from dual;

d. Select instr('production’, ‘ro’,3,2) from dual;

e. Select greatest('10-jan-07 12-oct-07') from dual;

f. Select date_add(‘2014-01-01’ interval 1 day) from dual;

h. Select datediff(day, ‘2015-02-01’,’2015-02-19') from dual;

You might also like