answersLogoWhite

0

If commands are executed within a transaction, the commitwill make the changes made by the commands permanent. The commands can also be undone using a rollback or by closing the session without an explicit commit.

For example;

begin transaction

go

update customer set Balance = Balance * 0.15

update product set OnHand = 0

delete vendor

go

commit transaction

If the process gets as far as the commit, then all of the commands will happen. If something goes wrong, such as the server rebooting, then any changes will be undone.

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

What is the command to retrieve deleted data from any table in SQL?

rollback command can retrieve deleted data from a table, provided commit has not been performed after deleting the data. both rollback and commit are transaction control statements.


Can you use SQL to pull data from Oracle?

yes.... example: select *from employee; dml command in sql language


What is the purpose of the AS command in SQL?

If you are in search of learning the purpose of the AS command in SQL, there are a few resources that are available to you. One resource that can explain the purpose of the AS command in SQL is Wikipedia.


What does the replace command perform in SQL?

The replace command function in SQL preforms comparisons on the collation of an input or inputs. It also replaces the text in a string of the SQL server.


What is the use of the SQL sort?

The use of sorting information in SQL is to organize database query results. Typically the data can be sorted in either ascending or descending order. The "Order By" command can be used to sort data in SQL by multiple columns.


How do you take delayed backup in SQL Server?

go to sql command prompt.


Difference between roll back and commit in sql?

in sql commit is used for saving the changes made in database and roll back is to roll back them , changes will not get saved in the database


Will SQL training teach me how to use the INNER JOIN command?

SQL is a mostly standard language that allows for analysis and presentation of data stored in a database. The INNER JOIN command is one of the basic SQL commands. SQL training will teach you how to use this command, as well as the commands that result in other types of joins, like outer joins, left outer joins, etc. The best SQL training sources will present you with a simple set of raw data and examples of the result sets generated from each type of query. Be aware that there are several similar versions of SQL that vary with each target database (SQL Server, DB2, etc.) so be sure that the training you sign up for is specific to the database that you intend to use.


How do you put SQL Server in hot backup mode?

Use the TSQL backup command to backup an active database.


How do you create a data base?

If your database program uses standard SQL commands, you would use the CREATE DATABASE command.


How many syntaxes has the INSERT SQL command?

One can find more information about how many syntaxes have the INSERT SQL command from the following websites: Stack Overflow, Microsoft and Wikipedia.


What is drop command?

The DROP table command of SQL lets you drop a table from database . The database requires you to empty a table before you eliminate from the database. But there is a condition for dropping a table ; it must be an empty table.