Collections:
Create a Table for Transaction Testing in MySQL
How To Create a Table for Transaction Testing in MySQL?
✍: FYIcenter.com
If you want to learn transaction management, you should create a table with the InnoDB storage engine. The default storage engine MyISAM does not support the transaction concept. The tutorial exercise below shows you a good example of creating a new table with the InnoDB storage engine:
>\mysql\bin\mysql -u dev -piyf fyi mysql> DROP TABLE fyi_links; mysql> CREATE TABLE fyi_links (id INTEGER PRIMARY KEY, url VARCHAR(16) NOT NULL, notes VARCHAR(16), counts INTEGER, created TIMESTAMP DEFAULT CURRENT_TIMESTAMP()) ENGINE = InnoDB; Query OK, 0 rows affected (0.25 sec) mysql> SHOW CREATE TABLE fyi_links; CREATE TABLE `fyi_links` ( `id` int(11) NOT NULL, `url` varchar(16) NOT NULL, `notes` varchar(16) default NULL, `counts` int(11) default NULL, `created` timestamp NOT NULL default CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 1 row in set (0.05 sec)
You should keep this table for to practice other tutorial exercises presented in this collection.
⇒ Turn on and off Autocommit in MySQL
⇐ Ways to End the Current Transaction in MySQL
2016-10-17, 2936🔥, 0💬
Popular Posts:
Where to find SQL Server database server tutorials? Here is a collection of tutorials, tips and FAQs...
How AdventureWorksLT tables are related in SQL Server? There are 12 user tables defined in Adventure...
How To Update Multiple Rows with One UPDATE Statement in SQL Server? If the WHERE clause in an UPDAT...
How To Break Query Output into Pages in MySQL? If you have a query that returns hundreds of rows, an...
What is dba.FYIcenter.com Website about? dba.FYIcenter.com is a Website for DBAs (database administr...