Creating a Sybase transaction |
|
At the end of each command press the space-bar or press enter before continuing the next step.
begin tran
go
If everything goes well, you see the database prompt (a period, the name of the database you are using, another period, the number one and then the greater than symbol).
After you have created a transaction, you can do your work like normal, with a few exceptions. For example, you cannot create or delete a table or a database.
If you see something like
Msg 2762, Level 16, State 4
Server '', Line 1
The 'DROP TABLE' command is not allowed within a
multi-statement transaction in the 'pubs2' database.
you have tried to do a command that is not allowed in a
transaction. You must commit the transaction to do that command.