View previous topic :: View next topic |
Author |
Message |
hisabari Beginner
Joined: 20 Apr 2005 Posts: 6 Topics: 4
|
Posted: Mon May 09, 2005 10:42 am Post subject: Question About Cursor and View |
|
|
1. Explain with an example about Static Cursor and Dynamic Cursor.
2. What is the difference while u are Inserting in to a table as well as
inserting into view to update the table. Ie., thru this view to update the
same table.
Eg. Emp is a table with eno,ename,esal
VEmp is the View , having the same structure and size of the Emp.
Table.
Now I am inserting first rec. to Emp table. And the another record is inserting in to the view. Okay what is the advantage while u are inserting this second record thru view to Table. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Mon May 09, 2005 10:51 am Post subject: |
|
|
hisabari,
Are these interview questions?
1. DB2 does not have DYNAMIC/STATIC cursors. You have DYNAMIC/STATIC SQL's . DB2 has Scrollable and Non-scrollable cursors.
2. A view does not exist physically. So any updates/inserts are performed on the base table itself. If the view and base table are having the same structure there is absolutely no advantage in inserting/updating using a view
Hope this helps...
Cheers
kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
hisabari Beginner
Joined: 20 Apr 2005 Posts: 6 Topics: 4
|
Posted: Mon May 09, 2005 11:05 pm Post subject: |
|
|
Thanx Kolusu,
No, No. It s not Interview questions. I have big doubt on that. Okay what is the Advantage while we are using View. Can any body pls. give me an example and explain.
Other wise pls. refer me the link.
Sabari. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
|
|