| Other SQL PLSQL Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| Can we write create command in the plsql block?if possible
how? | | 2 |
| how to create object in plsql | TCS | 1 |
| How many types of database triggers can be specified on a
table ? What are they ? | | 2 |
| What is difference between a PROCEDURE & FUNCTION ? | Satyam | 5 |
| Can a table have two primary keys? | HCL | 25 |
| What is the usage of NVL? | Infosys | 6 |
| What are % TYPE and % ROWTYPE ? What are the advantages of
using these over datatypes? | | 3 |
| SELECT flavor, SUM (ice_cream_sales) FROM sales_detail
GROUP BY flavor ORDER BY 2 DESC
If the "sales_detail" table contains ten records with
different values in the flavor column (two "vanilla,"
three "chocolate," four "strawberry," and one NULL), how
many rows are returned by the sample code above?
1. 0 rows
2. 1 row
3. 3 rows
4. 4 rows
5. 10 rows
| Sonata | 7 |
| What is the main difference between a UNION statement and a
UNION ALL statement?
1. A UNION statement eliminates duplicate rows; a UNION
ALL statement includes duplicate rows.
2. A UNION statement can be used to combine any number of
queries; a UNION ALL statement can be used to combine a
maximum of two queries.
3. A UNION statement can only combine queries that have
parallel fields in the SELECT list; a UNION ALL statement
can combine queries with differing SELECT list structures.
4. A UNION statement cannot be used with aggregate
functions; a UNION ALL statement can be used with aggregate
functions.
5. There is no difference between the two statements; they
are interchangeable.
| Sonata | 2 |
| How can we schedule the procedure to run automatically ? | | 3 |
| Hello All, Could any well write a query for the following
scenario.
Account(table name)
No Name Amount
1 ABCD 2000.00
2 DEFG -2000.00
3 GHIJ 3000.50
4 JKLM 4000.00
5 MNOP 6000.00
O/p Should be in this format
No Name Credit Debit
1 ABCD 2000.00 0
2 DEFG 0 -2000.00
3 GHIJ 3000.50
4 JKLM 0 -4000.00
5 MNOP 6000.00 o
could any one give appropriate query for this
Thnks in Advance
Suneel Reddy | Target | 4 |
| Please let me know if UNION ALL and Natural Join does the
same operation and are same... | iGate | 3 |
| State the difference between implict and explict cursor's? | | 6 |
| how to delete duplicate rows from a specified table(only
single table)
how do you know which join is need to be used | UST | 8 |
| What are the cursor attributes used in PL/SQL ? | | 3 |
| How to add Foreign key in a table after the creation of the
table? | Satyam | 3 |
| What are the different types of joins and explain them
briefly.
| | 3 |
| Types of joins ? | TCS | 9 |
| Delete duplicate records in the emp table. | | 5 |
| How to call DDL statements from pl/sql? | | 3 |
| |
| For more SQL PLSQL Interview Questions Click Here |