Dbms Lab Internal 2
Dbms Lab Internal 2
Write an SQL query to fetch “FIRST_NAME” from the Worker table using the alias
name <WORKER_NAME>.
Write an SQL query to fetch “FIRST_NAME” from the Worker table in upper case.
Write an SQL query to fetch unique values of DEPARTMENT from the Worker
table.
Write an SQL query to print the first three characters of FIRST_NAME from the
Worker table.
(B).Create a view on workers table and perform insertion and update on view.
(C ).Write a PL/SQL Program to find factorial of a positive number.
Write an SQL query to print the FIRST_NAME from the Worker table after replacing
‘a’ with ‘A’.
Write an SQL query to print the FIRST_NAME and LAST_NAME from the Worker
table into a single column COMPLETE_NAME. A space char should separate them.
Write an SQL query to print all Worker details from the Worker table order by
FIRST_NAME Ascending and DEPARTMENT Descending.
Write an SQL query to print details for Workers with the first names “Vipul” and
“Satish” from the Worker table.
(B). Create trigger that doesn’t allow a salary to be updated if the Worker id is null.
(C). Write a PL/SQL program to find largest of 3 numbers
Write an SQL query to print details of the Workers whose FIRST_NAME ends with
‘h’ and contains six alphabets.
Write an SQL query to print details of the Workers whose SALARY lies between
100000 and 500000.
Write an SQL query to fetch the no. of workers for each department in descending
order.
Write an SQL query to fetch the no. of workers for each department in descending
order.
Write an SQL query to print details of the Workers who are also Managers.
(B). Write a PL/SQL block to Generate Fibonacci Series
(C ).Create a view on department table .
Write an SQL query to fetch duplicate records having matching data in some fields of
a table.
Write an SQL query to show only odd rows from a table.
Write an SQL query to show only even rows from a table.
Write an SQL query to show the current date and time.
Write an SQL query to show the top n (say 10) records of a table.
Write an SQL query to fetch the list of employees with the same salary.
(B). Write a PL/SQL program to find multiplication table
(C ). PL/SQL Program to raise NO_DATA_FOUND_ exception for workers table
Write an SQL query to fetch departments along with the total salaries paid for each of
them.
Write an SQL query to fetch the names of workers who earn the highest salary.
Write an SQL query to fetch three max salaries from a table.
Write an SQL query to fetch three min salaries from a table
(B). Write a PL/SQL program to print 1 to 10 numbers using While and For loop
(C).Write a PL/SQL Program to raise Divide by zero exception.