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.


Is sql a command line?

SQL (Structured Query Language) itself is not a command line; rather, it is a programming language used for managing and manipulating databases. However, SQL can be executed through command-line interfaces (CLIs) provided by database management systems, such as MySQL or PostgreSQL. These CLIs allow users to enter SQL commands directly to interact with the database. Thus, while SQL commands can be run in a command-line environment, SQL itself is a language, not a command line.


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.


What is the command to mount the database?

To mount a database in Oracle, you can use the SQL command: ALTER DATABASE MOUNT;. This command is typically executed in SQL*Plus or a similar Oracle database interface after you have connected to the database instance. Mounting the database allows the Oracle instance to read the control files and prepare to open the database.


How do you create a data base?

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