First round
-------------------
- Procedure
- Packages
- Views
- Virtual tables
- Can we use dcl with in function?
- Joins and few scenarios
- Triggers and its type
- Pragma, type and its functionality
- How to create db link in oracle
- Materialized view
- How to find duplicate values from table?
- Cursor and its functionality
- Write a script to display friday and its date from a entire year.
- Exception Handling

Second round
------------------------
Gave a scenario like. Need to write a function to perform. When user try to change a password. It must not be last five password and a given password can be combination of characters, symbols, upper and lower case.



First round ------------------- - Procedure - Packages - Views - Virtual tables - Can we use dcl wi..

Answer / Rupendra Bahadur Singh

[First Round]-n- Procedure: A procedure is a collection of PL/SQL statements that can be called by name.n- Packages: A package is a collection of related procedures, functions, and variables.n- Views: A view is a virtual table based on the result set of a SELECT statement.n- Virtual tables: A virtual table is a temporary table created in memory.n- Can we use dcl with in function? Yes, DCL (Data Control Language) statements can be used within PL/SQL functions to control access to database objects.n- Joins and few scenarios:n - INNER JOIN: Combines rows from two tables where the join condition is true.n - LEFT JOIN: Returns all rows from the left table and matching rows from the right table, if any.n - RIGHT JOIN: Returns all rows from the right table and matching rows from the left table, if any.n- Triggers and its type:n - DDL triggers: Activate when changes to database objects occurn - DML triggers: Activate when changes to data in a table occurn- Pragma, type and its functionality: PRAGMA is a directive that can be used to set various options for the Oracle Database compiler.n- How to create db link in oracle: To create a database link, use the CREATE DATABASE LINK statement.n- Materialized view:n - A materialized view is a precomputed and stored version of a query result that can be used to improve query performance.n- How to find duplicate values from table?: Use the DISTINCT keyword in a SELECT statement to eliminate duplicates, or use aggregate functions such as COUNT(*) or GROUP BY to count the number of occurrences of each value.n- Cursor and its functionality: A cursor is a server-side pointer to a set of rows in a database table.n- Write a script to display friday and its date from a entire year.: Here's a sample SQL script that displays Friday dates for an entire year:nn```sqlnSET SERVEROUTPUT ON;nDECLAREn my_date DATE; nBEGINn FOR i IN 1..365 LOOPn my_date := TO_DATE('01-JAN-' || TO_CHAR(i) || '+' || ((MOD(i,7)-1) * 7) || ' DAY');n IF EXTRACT(DAYOFWEEK FROM my_date) = 6 THENn DBMS_OUTPUT.PUT_LINE('Friday: ' || TO_CHAR(my_date, 'DD-MON-YYYY'));n END IF;n END LOOP;nEND;```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

can i create trigger on synonym is it possible or not please help me

4 Answers   CGI,


Write a query to find the employees from EMP table those who have joined in Monday. (there is a column as hiredate which is a date column i.e values are like 03-DEC-81)

5 Answers  


What is materialized view in sql?

1 Answers  


What is ON DELETE CASCADE?

3 Answers  


Mention what pl/sql package consists of?

1 Answers  


How much does sqlite cost?

1 Answers  


What are basic techniques of indexing?

1 Answers  


What is difference between inner join and self join?

1 Answers  


What is sql catalog?

1 Answers  


What is pessimistic concurrency control? : Transact sql

1 Answers  


what is single byte over head in oracle..?

1 Answers  


How to download oracle sql developer?

1 Answers  


Categories