Questions tagged [sqltransaction]

An SQL-transaction is a unit of work that is performed against a database. Transactions are units or sequences of work accomplished in a logical order. Executing SQL-statements in Transactions, can ensure data integrity and handle database errors.

An SQL-transaction is a unit of work that is performed against a database. Transactions are units or sequences of work accomplished in a logical order.

A transaction is the propagation of one or more changes to the database. For example, creating, updating, or deleting a record from the table. Transactions are used to ensure data integrity and to handle database errors, by collecting SQL queries into a group and executing all of them together, as one unit of work.

Properties of Transactions: Transactions have the following four standard properties, usually referred to by the acronym ACID:

  • Atomicity: ensures that all operations within the work unit are completed successfully; otherwise, the transaction is aborted at the point of failure, and previous operations are rolled back to their former state.
  • Consistency: ensures that the database properly changes states upon a successfully committed transaction.
  • Isolation: enables transactions to operate independently of and transparent to each other.
  • Durability: ensures that the result or effect of a committed transaction persists in case of a system failure.
233 questions
-1
votes
1 answer

Scheduling a SQL Job

what is the best way to schedule a SQL Job to run from (any date range) i.e. 15th to 18th every single month with no end date? Thanks in advance. john
John
  • 51
  • 2
  • 9
-1
votes
2 answers

Which statements belong to a transaction in SQLite 3?

I'm planning to write a multi-threaded application that uses SQLite 3 to communicate with a database. It is planned that the database is concurrently read and written by multiple threads. One of the things I want to do is executing a series of…
fuz
  • 88,405
  • 25
  • 200
  • 352
-1
votes
1 answer

How to lock rows for update and then update a table using a variable in MySQL

I have a purchasing table that stores all orders that a store receives. In some cases, I have to re-order the an item at a different cost. When I make a sale transaction, I need to be able to determine the total cost of the item sold using FIFO…
Jaylen
  • 39,043
  • 40
  • 128
  • 221
-2
votes
1 answer

Sql transaction what can come after

Can you please tell me why c and d are the right answers here ? Thank you Select the statements that can be used to complete the following SQL code block BEGIN TRANSACTION SELECT COUNT(*) FROM Enrollments WHERE Accepted = 1 UPDATE Enrollments SET…
-2
votes
1 answer

how to speed retrieving data from big table data when select from it?

Problem I have table have 20 columns when make select data from new SQL query computer hangs ? what suggestion to make quickly read data from this table and make performance good ? What I Try ========== select * from table where 1=1 take 45…
-2
votes
2 answers

Declaring variable in PL/SQL when Commit transaction

I try to write this transaction in Oracle Developer: DECLARE @UserID int: SET @UserID = 2323; BEGIN TRANSACTION; DELETE FROM OWNER.TABLE WHERE USER_ID = @UserID; COMMIT TRANSACTION But int is red - error say about there is no in or out
RafalQA
  • 127
  • 2
  • 3
  • 12
-2
votes
2 answers

Sql transaction rollback from other form

I have 2 Forms: 1.MainForm : in which users are asked to input name, Family, then there is button named as "payment detail"(which opens Form2). 2.Form2 The user input the payment detail and click on Save button. Then this transaction insert the new…
-4
votes
2 answers

SQL: Is it possible to block a table insert just prior to the completion of a transaction?

TL;DR: My real question is in the title, is it possible to block a table insert just prior to the completion of a transaction, that is, only concerning the data as it would be right before the transaction would be committed? UPDATE: What procedes is…
1 2 3
15
16