I know that you do the BEGIN; command, then all commands after that can be rolled back, as long as you haven't executed COMMIT; yet. My question is, is there a command to roll back just one command and not ALL commands after the BEGIN? I'm using Postgres by the way.
Is it possible to rollback only one command (not whole transaction) in SQL?
967 Views Asked by an honest observer At
1
There are 1 best solutions below
Related Questions in SQL
- Can MVC.NET prevent SQL-injection at razor or controller level?
- SQL server not returning all rows
- When dealing with databases, does adding a different table when we can use a simple hash a good thing?
- Creating a parametrized field name for a SELECT clause
- Combine two rows based on common ID
- Column displays each count
- Slick query for one to optional one (zero or one) relationship
- Aggregate and count in PostgreSQL
- MAX and GROUP BY - SQL
- SQL statement for a tricky 2 table query
- How to create nested selects with sql?
- Pull and push data from and into sql databases using Excel VBA without pasting the data in Excel sheets
- Best Practice for adding columns to a Table in Oracle database
- SQL FIFO STACK using two tables
- SQL Query - Order by String (which contains number and chars)
Related Questions in POSTGRESQL
- Why does adding a JOIN completely modify the query planner behaviour?
- When dealing with databases, does adding a different table when we can use a simple hash a good thing?
- Aggregate and count in PostgreSQL
- Rails HABTM: Select everything a that a record 'has'
- Trigger using data from inserted row
- Select results where joined table contains records with an attribute, but without another
- DB candidate as CouchDB/Schema replacement
- How do I properly add data in SQLAlchemy?
- Postgres in Conda Environment (Ubuntu 14.04)
- How to customize the output of the Postgres Pseudo Encrypt function?
- Split a large query (2 days) into pieces to increase the speed in Postgres
- Why does pg_search prefix not work like I expect?
- extracting meta info from a table psql using information_schema
- How to query a table in the database and copy it's data into one one?
- Update a table using info from a second table and a condition from a third table in Postgresql
Related Questions in ROLLBACK
- combining rollback in two action rails 4
- Symfony2: transactions fail with "There is no active transaction."
- PHP rollback on IBMi db2 doesn't work
- Which git feature should I use for breaking big commit (pushed and reversed) into smaller commits?
- Teradata does it have a ROLLBACK
- It always go to OleDbException
- How to prevent errors when saving multiple models in Laravel 5
- Unexpected Rollback upon saving form
- Dependent rollback among different DAO implementation
- Why are these nested SQL Server transactions throwing a mismatch error if there is a rollback?
- Git Extensions rollback last 2 commits
- What happens to inserted records when a model function returns before it reaches to rollback or complete?
- Entity Framework - Issues in DbContextTransaction.Rollback()
- Rails rollback transaction for bids
- Where will be the message after all attempts to deliver at endpoint in mule rollback exception strategy?
Related Questions in SAVEPOINTS
- DB2 savepoint in stored procedure is invalid
- ActiveRecord, MySQL, and nested transactions -- what's the behavior?
- Is Flink standalone cluster manual restart graceful wrt to job state/processing offset?
- How to get all savepoint states list in mysql
- How to retry transaction after exception in postgreSQL
- Rollback to savepoint doesn't release locks
- Drupal on mysql cluster
- Jdbc check for capability - savepoint release
- In SQL, what happens if you try to rollback to a savepoint from another user?
- Flink, How to create a Sink supported Savepoint?
- Duplicated messages reading via flink savepoints
- Flink: How to persist and recover a ValueState
- Flink savepoint not saving the valuestates
- ora-01086 : save point was not established or invalid
- Using SAVE TRANSACTION SavePointName in a Stored Procedure
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Read https://www.postgresql.org/docs/14/tutorial-transactions.html about
SAVEPOINTandROLLBACK TO SAVEPOINT.