Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How To Start a New Transaction Explicitly
How To Start a New Transaction Explicitly? - MySQL FAQs - Transaction Management: Commit or Rollback
✍: FYIcenter.com
If you are confused on the implicit new transaction rules, you can always start a new transaction with the "START TRANSACTION" command to start a new transaction explicitly. "START TRANSACTION" command works in both "Autocommit On" and "Autocommit Off" modes.
The following tutorial exercise shows you how to start a transaction explicitly:
>\mysql\bin\mysql -u dev -piyf fyi
mysql> START TRANSACTION;
Query OK, 0 rows affected (0.01 sec)
mysql> INSERT INTO fyi_links (url, id)
VALUES ('fyicenter.com', 101);
Query OK, 1 row affected (0.11 sec)
mysql> INSERT INTO fyi_links (url, id)
VALUES ('centerfyi.com', 110);
Query OK, 1 row affected (0.00 sec)
mysql> SELECT * FROM fyi_links;
+-----+---------------+-------+--------+--------------------
| id | url | notes | counts | created
+-----+---------------+-------+--------+--------------------
| 101 | fyicenter.com | NULL | NULL | 2006-07-01 20:27:49
| 110 | centerfyi.com | NULL | NULL | 2006-07-01 20:28:10
+-----+---------------+-------+--------+--------------------
2 rows in set (0.07 sec)
mysql> ROLLBACK;
Query OK, 0 rows affected (0.07 sec)
2007-05-11, 5471👍, 0💬
Popular Posts:
How To Add Column Headers to a Table? - XHTML 1.0 Tutorials - Understanding Tables and Table Cells I...
How was XML handled during COM times? During COM it was done by using MSXML 4.0. So old languages li...
How To Compare Two Strings with strcmp()? - PHP Script Tips - PHP Built-in Functions for Strings PHP...
Write down the equivalent pointer expression for referring the same element a[i][j][k][l]? a[i] == *...
Is Session_End event supported in all session modes ? Session_End event occurs only in “Inproc mode”...