Search
 
SCRIPT & CODE EXAMPLE
 

SQL

pgsql commit rollback example

-- start a transaction
BEGIN;

-- deduct 1000 from account 1
UPDATE accounts 
SET balance = balance - 1000
WHERE id = 1;

-- add 1000 to account 2
UPDATE accounts
SET balance = balance + 1000
WHERE id = 2; 

-- select the data from accounts
SELECT id, name, balance
FROM accounts;

-- commit the transaction
COMMIT;
Comment

PREVIOUS NEXT
Code Example
Sql :: what is unsigned mysql 
Sql :: mysql check if entry exists 
Sql :: sql transact create cursor with dynamic tables 
Sql :: dynamic pivot 
Sql :: how to put value in parameters in mysqldataadapter 
Sql :: postgres create table like another table 
Sql :: setval postgres example table id 
Sql :: Alter precision 
Sql :: insert data mysql with cmd 
Sql :: data table footer customize 
Sql :: my sql data file extention 
Sql :: PostgresDownload 
Sql :: run all sql file from folder postgres command line 
Sql :: group_concat only returns one row 
Sql :: ALV GRID events 
Sql :: sqlite3 not commit 
Sql :: syntac for creating view in dbbrowser 
Sql :: cursor.execute (sql, value) ValueError: operation parameter must be str 
Sql :: modulous in sql 
Sql :: raise notice concat string postgresql 
Sql :: pl sql fetch 
Sql :: ring MySQL store binary data and special characters in the database after processing 
Sql :: fill a coulmn with a certain value sql 
Sql :: DAX Code Snippet To Seclect Top Rows In Query 
Sql :: postgres regex word boundary 
Sql :: configurasi database whmcs 
Sql :: repeatable read trong sql server 
Sql :: Oracle webcenter content search enginer 
Sql :: sql saut de ligne 
Sql :: pg_dump backup postgresql 
ADD CONTENT
Topic
Content
Source link
Name
5+1 =