SQL Tutorial - How to change data in a View

preview_player
Показать описание
Learn how to change data in a View in SQL, in this SQL Tutorial I will be talking about how to INSERT, UPDATE and DELETE data in Views. An important point to remember when modifying data in a View is that no changes are actually happening to the View, instead the data is being changed in the underlying base table. I talk through the rules for updateable Views and test out different scenarios.
Рекомендации по теме
Комментарии
Автор

Thanks a million sir,
For all value adding contents and tutorials

Adeyeye_seyison
Автор

Thank you so much for the video. Its very helpful. I smashed the thumbs up for you. One thought regrading the last comparison is that it depends on the sourceKey. So if you have two data sets that does not have a sourceKey then using the last recommendation may not work since you have join on the sourceKey.

fanzfanzilla
Автор

Hi BeardedDev, I do have a challenge that I am facing. Let say you are creating a view on top of multiple schemas dbo and dbo2, dbo2 has some auxiliary fields in new table, that in the future will become a single schema in dbo. How would you change data in that sort of view where insert is needed for both tables? Lets say I don't want to use triggers on the view and schema dbo cannot be changed. Will really be interested to know your answer.
Thanks.

KabirKhan-xiju
Автор

i always thought Views were Read-Only.
what would be the advantage of updating view against updating a table directly ?
Could you answer ?

srinivasaodela
Автор

Should rename it as 'with a View 'not 'in a view'.

pabeader