Autocommit off workflow

Autocommit off workflow

Medium SQL TCL 18 views
Explanation Complexity

Problem Statement

Write a simple script that turns autocommit off, runs two updates, then commits.

Input Format

SQL script

Output Format

Statements

Example

Any
Committed updates

Constraints

DB-specific; show common idea

Input / Output Format

Input Format
SQL script
Output Format
Statements
Constraints
DB-specific; show common idea

Examples

Input:
Any
Output:
Committed updates

Example Solution (Public)

SQL
SET AUTOCOMMIT = 0; UPDATE Orders SET status='PACKED' WHERE order_id=7001; UPDATE Orders SET status='PACKED' WHERE order_id=7002; COMMIT; SET AUTOCOMMIT = 1;

Official Solution Code

SET AUTOCOMMIT = 0; UPDATE Orders SET status='PACKED' WHERE order_id=7001; UPDATE Orders SET status='PACKED' WHERE order_id=7002; COMMIT; SET AUTOCOMMIT = 1;
Please login to submit solutions.
Editor
Output

                                        
Please login to submit solutions.