ODBC Server Reference Manual

Transact-SQL Language
HP NonStop ODBC Server Reference Manual429151-002
4-45
NonStop ODBC Server Compared With SQL Server
insert into employee
(empnum, first_name, last_name, deptnum,
jobcode, salary)
values (2001, "Dana", "Hall", 1010, 3001, 40000)
insert into employee
(empnum, first_name, last_name, deptnum,
jobcode, salary)
values (2002, "Fiona", "Stenhouse", 1020, 3001, 38000)
end
NonStop ODBC Server Compared With SQL Server
When used through the NonStop ODBC Server, BEGIN and END do not differ from the
SQL Server implementation. You cannot, however, use SQL Server control-of-flow
statements in programs used with the NonStop ODBC Server. BEGIN and END are
implemented to provide compatibility with SQL Server programs.
NonStop ODBC Server Compared With NonStop SQL/MP
NonStop SQL/MP does not have a statement that corresponds to BEGIN...END.
BEGIN TRANSACTION
Use BEGIN TRANSACTION to mark the starting point of a user-specified transaction.
The BEGIN TRANSACTION statement has the following syntax:
transaction-name
is the name associated with the transaction.
If you omit the transaction-name, no name is associated with this transaction.
Examples
The following transaction creates a table and inserts one row:
begin transaction
use test_disk01_persnl
create table employee
(empnum smallint,
first_name char(15),
last_name char(20),
deptnum smallint,
jobcode smallint,
salary money null)
BEGIN TRAN[SACTION] [ transaction-name ]