ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

How to make views updateable in sql server?

How to make views updateable in sql server while retrieving data from two tables. 

user-image
تم إضافة السؤال من قبل Shakir Ali , Full Stack Developer , https://www.freelancer.com
تاريخ النشر: 2017/05/23
AbdelMalek AIT AMOKHTAR
من قبل AbdelMalek AIT AMOKHTAR , SharePoint Freelancer , DotNet Partners

The views in SQL Server are updateable by design. howerver there is some restrictions on th update operation it serlf:

- the columns modified must be from the same table- the column modified must be real columns (not the result of an aggregation or calculation).

If you have to do modification that don't respect the restrictions, you can create an "Instead Of" trigger to tel how the modification could be done

Mahesh vootnuri
من قبل Mahesh vootnuri , DBA , smartdrive systems india pvt ltd

we requires UPDATE, INSERT, or DELETE permissions on the target table, depending on the action being performed.

By Using Sql management studio  

in object explorer we can find views than expand views 

then right click the view and select top 200 rows

Mohammed Nurul Amin Mozumder
من قبل Mohammed Nurul Amin Mozumder , Deputy coordinator , Integrated Development Foundation

The SQL UPDATE VIEW command can be used to modify the data of a view. All views are not updatable. So, UPDATE command is not applicable to all views. An updatable view is one which allows performing a UPDATE command on itself without affecting any other table.

Husain Jahid
من قبل Husain Jahid , Developer , Symphony Softtech Ltd

CREATE VIEW Name AS SELECT colum_Name1,colum_Name2,colum_Name3,colum_NameN FROM table_Name WHERE colum_Name IN ('value_1','value_2');

المزيد من الأسئلة المماثلة