Follow Our FB Page << >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

SQL PLSQL Interview Questions
Questions Answers Views Company eMail

Its possible to add more than one primary key for the table

4 5153

Write a procedure to return the month and the number of developers joined in each month (cursor )

Tech Mahindra,

2 7289

select 10 from dual; y its showing all the rows with 10?

1 4167

how to create temparary sequence


2 5620

i have 2 table table one 4 columns respective values a1 7,a2 6,a3 8 ,a4 12 & table two 4 colums respective values a1 7,a2 6,a3 8,a4 15.if table one & table two 3 colums same then 4th column values 1)Qes diff >5 then print 5 * diff value 2)Que diff <5 print 5

1 2542

What is the Difference between Procedure and Function.Can we call a Function in a DML?


2 5990

A table was given with 3 columns like Manager id,Manager Name and Employee name. Question was to create hierarchy.


2 6512

Practice 1: Changes to data will only be allowed on tables during normal office hours of 8.45 in the morning until 5.30 in the afternoon, MONDAY through FRIDAY. A. Create a procedure called SECURE_DML that prevents the DML statement from executing outside of normal office hours, returning the message: “you may only make changes during normal office hours” b. Create a statement trigger on the PRODUCT table which calls the above procedure. c. Test it by inserting a new record in the PRODUCT table.

Tech Mahindra,

1 8340

how to find the First and Last Observation from the table: Ex: OBS Name Sal Ans like: OBS Name Sal 105 E 5000--> 105 E 5000 102 B 2000 104 D 4000 103 C 3000 101 A 1000--> 104 D 4000

4 3604

I have the table like this S.No Name ID 01 Xyz 123 I want the result as 01Xyz123 How to write the query to retrieve the entire row data in a single column?

1 3179

How will you debug your procedure? If your procedure is around 2000 lines and the expected output is 10 and we get only output 5.So how will you debug it? Somebody pls give the correct answer?


2 9028

Table1: Col1 col2 1 2 10 3 4 89 5 6 Table:2 Col1 col2 3 2 9 5 4 7 6 87 With the help of table1 and table2 write a query to simulate the fallowing results. Output1: Col1 col2 1 2 2 3 3 4 4 5 5 6 Output2: Col1 col2 2 3 10 4 5 89 6 7 1.Write query for single row to multiple row using sql statements. Eg:a,b,c,d,e,f Change to A B C D E F 2. Write query for multiple row to single row using sql statements. Eg2 A B C D E F Change to Eg:a,b,c,d,e,f Table1: Col1 col2 8 5 2 9 4 2 5 1.Write a query to select all the rows from a table1,if the value of A is null then corresponding B’s value should be printed in A’s value.if the value of A is null in that table then corresponding B’s value should be printed as 30. 2. write a query to find the sum of A and B .display the max among both. 3.write a query to find total number of rows from table 1. Note: if any column value is null in a row then that row should be considered as 2 rows. 4.write a query to display all the records of table1 except A containg 2 as well B containg 5. 5.rewrite the fallowing without using join and group by. Select b.title,max(bc.returneddate –bc.checkoutdate)” mostdaysout” From bookshelf_checkout bc, Book shelf B Where bc.title(+)=b.title Group by b.title. 6.rewrite fallowing query Select id_category from category_master X where exists (select 1 from sub_category Y where X.id_category=Y.id_category) Customer: Name phone1 phone2 phone3 bitwise A 23456 67890 12345 --- B 67459 89760 37689 --- Don’t_call Col1 67890 37689 1.q) update the customer table of bitwise with 1 or 0. Exists in don’t_call table menas show -1 Other wise -0. Output. Name bitwise A 010 B 010



what is an associative array with example?

1 2499

what is global temporary tables and how use that tables in pl/sql packages

Cap Gemini,

1 8213

What is Materialized View? In What Scenario we Use Materialized View?

Dinesh, Marlabs,

2 7447

Post New SQL PLSQL Questions

Un-Answered Questions { SQL PLSQL }

What is meant by user defined function?


What is the purpose of design view?


What is 19 null in sql?


What is sql*loader and what is it used for? : aql loader


What is %type in pl sql?


how to dump a table to a file with 'mysqldump'? : Sql dba


How many indexes can be created on a table in sql?


Why do we need sharding?


How do I run a pl sql procedure in sql developer?


What is primary key and foreign key with example?


Why are aggregate functions called so?


what is sql in mysql? : Sql dba


how mysql optimizes distinct? : Sql dba


What is sql prepared statement?


How to convert comma separated string to array in pl/sql?