TCS Database Questions

1. What are the different types of joins?
2. Explain normalization with examples.
3. What cursor type do you use to retrieve multiple recordsets?
4. State the difference between a "where" clause and a "having" clause
5. What is the difference between "procedure" and "function"?
6. How will you copy the structure of a table without copying the data?
7. How to find out the database name from SQL*PLUS command prompt?
8. Tadeoffs with having indexes
9. Talk about "Exception Handling" in PL/SQL?
10. What is the difference between "NULL in C" and "NULL in Oracle?"
11. What is Pro*C? What is OCI?
12. Give some examples of Analytical functions.
13. What is the difference between "translate" and "replace"?
14. What is DYNAMIC SQL method 4?
15. How to remove duplicate records from a table?
16. What is the use of Analyzing the tables?
17. How to run SQL script from a Unix Shell?
18. What is a "transaction"? Why are they necessary?
19. Explain Normalization and Denormalization with examples.
20. When do you get constraint violation? What are the types of constraints?
21. How to convert RAW datatype into TEXT?
22. What is the difference between Primary Key and Aggregate Key
23. How functional dependency is related to database table design?
24. What is a "trigger"?
25. Why can a "group by" or "order by" clause be expensive to process?
26. What are "HINTS"? What is "index covering" of a query?
27. What is a VIEW? How to get script for a view?
28. What are the Large object types supported by Oracle?
29. What is SQL*Loader?
30. Difference between "VARCHAR" and "VARCHAR2" datatypes.
31. What is the difference among "dropping a table", "truncating a table" and "deleting all records" from a table.
32. Difference between "ORACLE" and "MICROSOFT ACCESS" databases.
33. How to create a database link ?

Showing Answers 1 - 32 of 32 Answers

1. What are the different types of joins?
Inner Join
outer join (left outerjoin , right outer join)
full outer join

2. Explain normalization with examples.
First Normal Form : Avaoids relation within a relation
Second Normal Form : Fully functional depended on each key
Third Normal Form : Avoids Transitivity dependency


3. What cursor type do you use to retrieve multiple recordsets?
 ref cursors'


4. State the difference between a "where" clause and a "having" clause

having comes along with group by


5. What is the difference between "procedure" and "function"?

procedure doesnot return a value thru return statement


6. How will you copy the structure of a table without copying the data?

select * from table_naem where 1 > 3


7. How to find out the database name from SQL*PLUS command prompt?

-


8. Tadeoffs with having indexes
9. Talk about "Exception Handling" in PL/SQL?
10. What is the difference between "NULL in C" and "NULL in Oracle?"
11. What is Pro*C? What is OCI?
12. Give some examples of Analytical functions.
13. What is the difference between "translate" and "replace"?
14. What is DYNAMIC SQL method 4?
15. How to remove duplicate records from a table?
16. What is the use of Analyzing the tables?
17. How to run SQL script from a Unix Shell?
18. What is a "transaction"? Why are they necessary?
19. Explain Normalization and Denormalization with examples.
20. When do you get constraint violation? What are the types of constraints?
21. How to convert RAW datatype into TEXT?
22. What is the difference between Primary Key and Aggregate Key
23. How functional dependency is related to database table design?
24. What is a "trigger"?
25. Why can a "group by" or "order by" clause be expensive to process?
26. What are "HINTS"? What is "index covering" of a query?
27. What is a VIEW? How to get script for a view?
28. What are the Large object types supported by Oracle?
29. What is SQL*Loader?
30. Difference between "VARCHAR" and "VARCHAR2" datatypes.
31. What is the difference among "dropping a table", "truncating a table" and "deleting all records" from a table.
32. Difference between "ORACLE" and "MICROSOFT ACCESS" databases.
33. How to create a database link ?

-Ram Naresh Yadav ( Yaduvancy )

sks

  • Mar 21st, 2006
 

13 what is the difference between translate and replace?

Answer

translate and replace both are replacing 3rd argument into first when 2nd argument is match with first.

but only difference is replace function replace whole string

but translate fucntion replace   character when matching  2nd argument with first.

syntax: translate(string, if , then)

                   

if condition matching

  Was this answer useful?  Yes

mehala

  • Apr 6th, 2006
 

30. Difference between "VARCHAR" and "VARCHAR2" datatypes.
The difference between Varchar and Varchar2 is both are variable length but only 2000 bytes of character of data can be store in varchar where as 4000 bytes of character of data can be store in varchar2.

  Was this answer useful?  Yes

anand karan

  • Apr 8th, 2006
 

1. What is the difference between "procedure" and "function"?
2. How will you copy the structure of a table without copying the data?
3. How to create a database link ?
4. How to find out the database name from SQL*PLUS command prompt?
5. What is SQL*Loader?
6. Difference between "VARCHAR" and "VARCHAR2" datatypes.
7. What is a "trigger"?
8.  What is the use of Analyzing the tables?
9. How to remove duplicate records from a table?
10.What is the difference between "translate" and "replace"?

  Was this answer useful?  Yes

hi iam basavaraj kolur

   the differance between varchar and varchar2 is

 varchar is varible datatype it also stores space ex: a varchar(10):='basu';

that a varible max length is 10 but the value that hold is only 4 charcters,this stores space also afterwads that name.that is total lenght 1o charcters .it use more memory spaces and it has also problem in comparision opertations

in case of varchar2: it leaves space only that match of varible can hold.it dont waste memory capacity

  Was this answer useful?  Yes

satish jain

  • Oct 10th, 2006
 

 What is SQL*Loader?

import export utility

  Was this answer useful?  Yes

Bharathi

  • Oct 31st, 2006
 

Hi,

The interview Questiuons r good...they will help me alot...

Thanks alot....

Regards

Bharathi.

  Was this answer useful?  Yes

ganesh

  • Dec 15th, 2006
 

Q. 27. What is a view? How to get the script of a View?



View is a logical table based on a table or another view. logical in the sense it doesn't contains data of its own it a saved query in the database. 2 types are avialable simple view and complex view. The tables on which a view is based is called as base table. Views are saved as a select statement in the data dictionary user_views.

  Was this answer useful?  Yes

Shourabh Tiwari

  • Feb 7th, 2007
 

? How to find out the database name from SQL*PLUS command prompt? Answer:- SELECT * FROM GLOBAL_NAME; IF we are not SYS/System user.

  Was this answer useful?  Yes

vishu7vishu

  • Feb 20th, 2007
 

Q.15 How to eliminate duplicate records from a table ?

1. Create an another table just to have non-duplicate records from your original table :

CREATE TABLE new_table AS SELECT DISTINCT * from old_table

2. Drop your original table :

DROP TABLE old_table

3. Rename the new_table to be old_table :

ALTER TABLE new_table RENAME TO old_table

In the process, all the duplicate records are eliminated n yet the name of the table is not changed.

Thanks & Regards,
Vishakha.

  Was this answer useful?  Yes

Taj Alam

  • Aug 16th, 2007
 

Delete from < TableName a >
Where rowid >(select min(rowid) from < TableName b >
Where a.< ColumnName > = b.< ColumnName >)

commit;

The above query will delete all duplicate columns.

 

  Was this answer useful?  Yes

Kiran

  • Jun 5th, 2012
 

To remove duplicate records the query is

delete from tablename t1 where rowid < ( select max(rowid) from tablename t2 where t1.column_name=t2.column_name)

  Was this answer useful?  Yes

siva

  • Dec 20th, 2015
 

Select instance_name from V$instance,
Select * from V$databse

  Was this answer useful?  Yes

vishal bansal

  • Jul 28th, 2016
 

This answer is incomplete... we have in total 6 types of joins from Oracle 10g onwards

Cross joins
Inner joins
Outer joins
Equi and non-equi joins
Self joins
Partitioned joins

  Was this answer useful?  Yes

rr

  • Apr 19th, 2017
 

Full OUTER also...is nothing but combination of Left and Right Outer Joins

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions