Showing posts with label savepoint. Show all posts
Showing posts with label savepoint. Show all posts

Monday, October 9, 2023

savepoint, rollback, commit in oracle db

 commit: make changes done in transaction permanent.

rollback : rollback the state of database to the last commit point.

savepoint : use to specify a point in transaction to which later you can rollback.





create table student 

(

id number primary key,

name varchar2(50),

college varchar2(50)

);


insert all

into student values (1,'pravin','ness')

into student values (2,'prakash','ness')

into student values (3,'pratap','ness')

into student values (4,'pranav','ness')

into student values (5,'prayank','ness')

select * from dual;


--create savepoint student_original --

savepoint student_original;


-- delete some records --

delete student where id=5;


-- rollback to student_original savepoint --

rollback to student_original;


-- most important fact --

you cannot rollback to any previous savepoint once you've triggered commit; 


Enable OpenSSH on Windows 11

Step 1: Install OpenSSH Server You can do this via PowerShell (run as Administrator ): Check if it's already available: Get-WindowsCapab...