Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Rollback Querry

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
hikaps14

Active User


Joined: 02 Sep 2005
Posts: 189
Location: Noida

PostPosted: Wed May 03, 2006 5:35 pm    Post subject: Rollback Querry
Reply with quote

hi ,

can ne tell me wat will be the effect of querry 1 on querry 2

Querry 1:


CREATE TABLE table1(col1 INT, col2 INT)
INSERT INTO table1 VALUES (2,2)
INSERT INTO table1 VALUES (323,2)
ROLLBACK

Querr 2:

wht is result for Select * from table1


i mean will there be a table created or not .

or will there be any other effect .

can ne body give me a clear idea regarding the result of Querry 2
Thanks in advance ,
-Kapil .
Back to top
View user's profile Send private message

DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Thu May 04, 2006 3:34 am    Post subject: Re: Rollback Querry
Reply with quote

Kapil,

What happend when you run this?

Methinks you'll get 'TABLE1 is an unidentified name' The rollback rolled it right out of existence.

Dave
Back to top
View user's profile Send private message
cheryala

New User


Joined: 20 Mar 2006
Posts: 46

PostPosted: Fri May 05, 2006 12:38 pm    Post subject:
Reply with quote

Hi,
Unless and untill you issue a commit after creating table ..the insert statements won't get executed.
Cheers
Cheryala
Back to top
View user's profile Send private message
shrivatsa
Warnings : 1

Active User


Joined: 17 Mar 2006
Posts: 171
Location: Bangalore

PostPosted: Fri May 05, 2006 1:14 pm    Post subject:
Reply with quote

Hi Kapil,

what david told is correct.
cheryala the insert statement will get executed.

here is the log for your info

CREATE TABLE TABLE1(COL1 INT, COL2 INT);
---------+---------+---------+---------+---------+---------+---
DSNE616I STATEMENT EXECUTION WAS SUCCESSFUL, SQLCODE IS 0
---------+---------+---------+---------+---------+---------+---
INSERT INTO TABLE1 VALUES (2,2);
---------+---------+---------+---------+---------+---------+---
DSNE615I NUMBER OF ROWS AFFECTED IS 1
DSNE616I STATEMENT EXECUTION WAS SUCCESSFUL, SQLCODE IS 0
---------+---------+---------+---------+---------+---------+---
INSERT INTO TABLE1 VALUES (323,2);
---------+---------+---------+---------+---------+---------+---
DSNE615I NUMBER OF ROWS AFFECTED IS 1
DSNE616I STATEMENT EXECUTION WAS SUCCESSFUL, SQLCODE IS 0
---------+---------+---------+---------+---------+---------+---
ROLLBACK;
---------+---------+---------+---------+---------+---------+---
DSNE616I STATEMENT EXECUTION WAS SUCCESSFUL, SQLCODE IS 0
---------+---------+---------+---------+---------+---------+---
---------+---------+---------+---------+---------+---------+---
DSNE617I COMMIT PERFORMED, SQLCODE IS 0
DSNE616I STATEMENT EXECUTION WAS SUCCESSFUL, SQLCODE IS 0
---------+---------+---------+---------+---------+---------+---
DSNE601I SQL STATEMENTS ASSUMED TO BE BETWEEN COLUMNS 1 AND 72
DSNE620I NUMBER OF SQL STATEMENTS PROCESSED IS 4


and for second query


SELECT * FROM TABLE1;
---------+---------+---------+---------+---------+---------+--------
DSNT408I SQLCODE = -204, ERROR: xxxxxx.TABLE1 IS AN UNDEFINED
NAME

Please correct me if I am wrong


Thanks
Shri
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts to extract node name from XML via DB2... Gopalakrishnan V DB2 3 Mon Aug 31, 2015 1:58 pm
No new posts TWA variable having junk value after ... Gopalakrishnan V CICS 1 Tue May 13, 2014 7:59 pm
No new posts Handle ROLLBACK in EXCI interface Pandora-Box CICS 12 Fri Sep 21, 2012 2:38 pm
No new posts Rollback does not remove messages? Susan Talbot Java & MQSeries 5 Fri Sep 23, 2011 11:38 pm
No new posts MQ ROLLBACK? anshuljain26 Java & MQSeries 6 Tue Aug 02, 2011 12:31 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us