Hello,
I am trying to get some information about Vertica Transactions. I ran a few Google searches and the only syntax that I found was using the ADO.NET object to create them.
Is there a way to write Vertica Transaction similar to the way it is done in SQL and/or Oracle? Or do I have to use the ADO.NET object?
Something like this...
CREATE TRANSACTION test
BEGIN TRAN
SELECT * FROM table
END TRAN
COMMIT;
Thank you!
Transactions
Moderator: NorbertKrupa
- JimKnicely
- Site Admin
- Posts: 1825
- Joined: Sat Jan 21, 2012 4:58 am
- Contact:
Re: Transactions
Hi,
Vertica supports conventional SQL transactions with ANSI SQL 92 style-implicit transactions. You do not need to run a BEGIN or START TRANSACTION command.
However, you can...
START TRANSACTION:
https://my.vertica.com/docs/8.0.x/HTML/ ... ACTION.htm
END/COMMIT:
https://my.vertica.com/docs/8.0.x/HTML/ ... ts/END.htm
https://my.vertica.com/docs/8.0.x/HTML/ ... COMMIT.htm
Example:
dbadmin=> begin transaction;
BEGIN
dbadmin=> select * from dual;
dummy
-------
X
(1 row)
dbadmin=> end;
COMMIT
Vertica supports conventional SQL transactions with ANSI SQL 92 style-implicit transactions. You do not need to run a BEGIN or START TRANSACTION command.
However, you can...
START TRANSACTION:
https://my.vertica.com/docs/8.0.x/HTML/ ... ACTION.htm
END/COMMIT:
https://my.vertica.com/docs/8.0.x/HTML/ ... ts/END.htm
https://my.vertica.com/docs/8.0.x/HTML/ ... COMMIT.htm
Example:
dbadmin=> begin transaction;
BEGIN
dbadmin=> select * from dual;
dummy
-------
X
(1 row)
dbadmin=> end;
COMMIT
Jim Knicely
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.