what is difference between commit and rollback.?

Answer Posted / malli.gontla

suppose u have one table which is in database. The table
contains some records. U want to modify one record of table.
after modification, u don't want that new values for
the record. just u use rollback command. previous values are
placed in database.

Example:
Case 1: Roll Back
sno name palce
1 abc hyderabad
2 xyz bangalore.

This is the table and it contains some records.
Suppose if u want change the 2nd record, means palce
is changed to chennai.

After modification:
sno name palce
1 abc hyderabad
2 xyz Chennai.

Suppose if u want old values, means u don't want new
values. At that time u use roll back command

After useing rollback:
sno name palce
1 abc hyderabad
2 xyz bangalore.
after using roll back, the records are comes like
above(original records)

Case 2: Commit
sno name palce
1 abc hyderabad
2 xyz bangalore.

This is the table and it contains some records.
Suppose if u want change the 2nd record, means palce
is changed to chennai.

After modification:
sno name palce
1 abc hyderabad
2 xyz Chennai.

After useing commit:
sno name palce
1 abc hyderabad
2 xyz Chennai.
after using commit, the table is finilased.u can't get
old values by uisng roll back.

Once if u use commit,u can't get old values for using of
rollback. Before commit, u can get old values for rollback.

Is This Answer Correct ?    112 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the difference between a dialog program and a report?

553


Suppose there is a secondary index on 4 non-key fields A,B,C & D. There are 3 select queries :- a) one on basis of A, B, C , D b) Second on basis of A, B, C c) Third on basis of D, C,B, A In which all situations , the above secondary index will be used?

1073


What is the difference between leave transaction and call transaction?

614


What is the first thing you do after vendor setup is complete?

891


what is defference between repository and non repository Object?

6706






Can I execute user exits? If yes, how?

598


the problem is that , while i am undergoing with my practice session, i am creating too many new programs.they are occupying much space in my hard-disk. how to delete un-necessary programs completely from my data- base........... plz help me with this .....

1570


How is conversion of data types done between abap/4 & external level?

573


What is the maximum number of match code id's that can be defined for one match code object ?

541


After running a BDC program in background, next day morning when you see the results, few records are not updated(error records). What will you do then ?

1455


Differentiate database index and match code.

603


What is occurs in internal table?

600


How we can retrieve data using secondary index. Explain with simple example?

616


Define structure in abap data dictionary?

622


How do you populate data into a multiple line field?

588