SQL_Part 4_RB
SQL_Part 4_RB
(SQL)
Syntax:
commit;
2. ROLLBACK :
This command is used to get the data or restore the data to the last savepoint or
last committed state. If due to some reasons the data inserted, deleted or
updated is not correct, you can rollback the data to a particular savepoint or if
savepoint is not done, then to the last committed state.
Syntax:
Rollback;
Aartronix Innovation Pvt. Ltd
4
Commit Example
In SQL, the CROSS JOIN is used to combine each row of the first table with each row
of the second table. It is also known as the Cartesian join since it returns the
Cartesian product of the sets of rows from the joined tables.
Syntax:-
SELECT [column names]
FROM [Table1]
CROSS JOIN [Table2]
SELECT *
FROM employee
CROSS JOIN department