What is difference between alias and synonym in db2?



What is difference between alias and synonym in db2?..

Answer / Deepak Singh Rathore

In DB2, an alias is a temporary name given to a table or column within a single SQL statement. A synonym is a permanent name that refers to another object (table or view) in the same or another schema.n```sqlnalias:n SELECT col1 AS new_col FROM your_table;nsynonym:n CREATE SYNONYM new_table_name FOR existing_table_name;n```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More DB2 Interview Questions

What is the use of commit in db2?

1 Answers  


What is isolation level?

4 Answers  


How do I create a table MANAGER (EMP-NO, MANAGER) where MANAGER is a foreign key which references to EMP-NO in the same table? Give the exact DDL.

3 Answers  


explain about index with examples

2 Answers   Syntel,


For unmatched rows returned from an outer join, the column values in the other table are set to null e.g If A OUTER JOIN B returns some unmatched rows from A, the corresponding column values in B will be set to null. What can be done so that a null value is not displayed for these columns?

3 Answers  


What happens in bind step in a db2 program?

1 Answers  


What are the two types of logging in the db2 database? Explain them.

1 Answers  


Which one allows duplicate values Union or Union All ?

3 Answers  


What does an outer join do?

1 Answers   CTS,


What is db2 isolation?

2 Answers  


How to find the maximum value in a column in the db2 database?

1 Answers  


Do we need cursor for Count(*)?

4 Answers   iGate,


Categories