|
From: Jason L. W. <jwh...@jw...> - 2007-07-25 20:14:56
|
> Jason L. Wharton escreveu: > > Relation alias support for columns on the FOR UPDATE OF <column list> as > > well as on UPDATE and DELETE statements will make it so that joined > > datasets can be worked with precisely. > Why relation alias in column list? So that IBO will know which exact columns in the query can be edited and how to link them to the UPDATE statement when resolving the updates. When working with a joined result set there are potentially multiple records involved in the cursor on the server. Each table involved in the cursor should have a table alias associated to it so that I can send multiple UPDATE statements, one for each relation alias that has changes. This way, it will be quite easy to support cursor based updates of joined datasets. Also, the column list is important because there may be some columns in the dataset that are not updatable where some that are. Only specifying a limited number of columns that will be updated can help avoid permissions issues when protected data is involved with the query. It may also help to use less resources on the server if it knows only certain columns will have updates against them in the cursor. > The relation name will should be passed in the UPDATE statement, i.e., > update **relation** set col = val where current of cursor Yes, and it will be necessary for the relation alias name to also be sent so that it can identify which exact record in the server's cursor that the update is intended for. > Adriano Hope this helps... Jason L Wharton |