February 7, 2011 at 1:02 am
suppose i create a view on two tables emp and dept .is it possible to update a view which is created on two tables,if possible how can i do that,pls help me
February 7, 2011 at 5:21 am
Hi,
As per Your question. i understand that u need to later the view which you created on the two tables.if yes
Then you can use Alter [viewname] [Column....] as your select statement.
February 7, 2011 at 6:34 am
The usual answer: it depends on the view, and the data that is in it. when it's a simple join of multiple tables, you can often update the view directly.
if the update you are attempting requires a key that doesn't exist (like adding a deptID and Dept_Name to a related table), you'd need a trigger on the view to put the value in the lookup table; same thing for parent child views, like invoice and Invoice Details...
get a Dev copy of the data on your machine, and simply start testing with some basic updates. chances are, a simple update will work; inserts might require a trigger to handle FK's, it all depends ont he data in question.
Lowell
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply