0% found this document useful (0 votes)
16 views

SQL Practica 6

Uploaded by

Daniel Juarez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

SQL Practica 6

Uploaded by

Daniel Juarez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

SQL> --S1--T0--

SQL> select employee_id, email, phone_number from hr.employees where


last_name='Himuro';

EMPLOYEE_ID EMAIL PHONE_NUMBER


----------- ------------------------- --------------------
118 GHIMURO 515.127.4565

SQL> --S2--t1
SQL> select employee_id, email, phone_number from hr.employees where
last_name='Himuro';

EMPLOYEE_ID EMAIL PHONE_NUMBER


----------- ------------------------- --------------------
118 GHIMURO 515.127.4565

SQL> --S1--t2
SQL> update hr.employees set phone_number='515.555.1234' where employee_id =118 and
email='GHIMURO' and phone_number='515.127.4565';

1 row updated.

SQL> --S2--t3
SQL> update hr.employees set phone_number='515.555.1235' where employee_id =118 and
email='GHIMURO' and phone_number='515.127.4565';

SQL> --S1--t4
SQL> commit;

Commit complete.

SQL> --S2--t5
0 rows updated.

SQL> --S1--t6
SQL> update hr.employees set phone_number='515.555.1235' where employee_id =118 and
email='GHIMURO' and phone_number='515.555.1234';

1 row updated.

SQL> --S2--t7
SQL> select employee_id, email, phone_number from hr.employees where
last_name='Himuro';

EMPLOYEE_ID EMAIL PHONE_NUMBER


----------- ------------------------- --------------------
118 GHIMURO 515.555.1234

SQL> --S2--t8
SQL> update hr.employees set phone_number='515.555.1235' where employee_id =118 and
email='GHIMURO' and phone_number='515.555.1234';

1 row updated.

SQL> --S1--t9
SQL> rollback;

SQL> --S2--t10
SQL> commit;
Commit complete.

Rollback complete.

SQL> select xid,status from v$transaction;

XID STATUS
---------------- ----------------
020013006F040000 ACTIVE

SQL> ---Seccion de comentarios y conclusiones


Pues practicamente comprobamos que los bloqueos oracle los lleva de manera
automatica sin intervencion del usuario
esto para que no causen conflictos a la hora de estar manipulando datos de manera
simultanea, la prueba clara de
esto es el t3 de sesion2 y en el t8...

You might also like