Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

PostgreSQL COMMIT

Transaction Control:
There are following commands used to control transactions:
  • BEGIN TRANSACTION: to start a transaction.
  • COMMIT: to save the changes, alternatively you can use END TRANSACTION command.
  • ROLLBACK: to rollback the changes.
Transactional control commands are only used with the DML commands INSERT, UPDATE and DELETE only. They can not be used while creating tables or dropping them because these operations are automatically committed in the database.

The BEGIN TRANSACTION Command:
Transactions can be started using BEGIN TRANSACTION or simply BEGIN command. Such transactions usually persist until the next COMMIT or ROLLBACK command is encountered. But a transaction will also ROLLBACK if the database is closed or if an error occurs.

Following is the simple syntax to start a transaction:
BEGIN;
or
BEGIN TRANSACTION;
The COMMIT Command:
  • The COMMIT command is the transactional command used to save changes invoked by a transaction to the database.
  • The COMMIT command saves all transactions to the database since the last COMMIT or ROLLBACK command.
The syntax for COMMIT command is as follows:
COMMIT;
or
END TRANSACTION;


Comments

Popular posts from this blog

Pgbadger Feature In Postgresql

ERROR: operator does not exist: text ->> unknown LINE 1: ...stomer' as customer_name,sales_info ->>'PRODUCTS' ->>'produc... ^ HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.

rman interview and scenario based questions and answer and also rman(backup and recovery) discussions panel

PostgreSQL Enterprise Manager - PEM Monitoring Tools

VMWARE WORKSTATION 3,4,5,6,7,8,9,10,11,12,14,15...etc LICENSE KEYS COLLECTION