Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 simple transaction and view

Author  Topic 

salmonraju
Yak Posting Veteran

54 Posts

Posted - 2006-11-23 : 04:44:58
I created 2 tables
Tab1(contains description of student)
ID Name Branch Age

Tab2(contains marks secured by student in different subjects)
ID SUB1 SUB2 SUB3

Here My task is to attain Atomicity (ACID property)

it will work fine with transaction concept

BUT I created a view say Join_view as

ID Name Branch Age SUB1 SUB2 SUB3

if i wrote insert command like the below, will it also a TRANSACTION

insert into Join_View values('12','ssdd','comp',23,12,34,45)

so that data will be entered in two tables and attain atomicity
will it correct or any problems occurs with view





harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2006-11-23 : 05:12:39
First of all, your view will not be updatable because it does not contain all columns in underlying tables. (You will have to write INSTEAD OF trigger for that)

Secondly insert statement will run in implicit transaction mode by default, so it will be atomic.

Harsh Athalye
India.
"Nothing is Impossible"
Go to Top of Page
   

- Advertisement -