Search Blog

Search duranek.blogspot.com

Saturday, May 8, 2010

mysql id primary key auto-increment convert

alter table proddeploymenttree modify id int(10) not null auto_increment PRIMARY KEY

Sunday, April 25, 2010

Websitesine Favicon ekleme

A favicon (short for favorites icon), also known as a website icon, shortcut icon, url icon, or bookmark icon is a 16×16, 32×32 or 64×64 pixel square icon associated with a particular website or webpage.[1] A web designer can create such an icon and install it into a website (or webpage) by several means, and most graphical web browsers will then make use of it.

<"link" rel="icon" type="image/png" href="http://example.com/image.png">

buradan generate edebilirsin : http://www.favicon.cc/

Friday, April 16, 2010

MySQL IBatis te insertten sonra auto_increment key i dönmek



SELECT LAST_INSERT_ID() AS value

INSERT INTO
deploymenttree(name,devdeploymentid,proddeploymentid,parentId)
VALUES(
#name#,#devDeploymentId#,#prodDeploymentId#,#parentId# )

Mysql de commit li sistem

Tablolari InnoDB yap
SET AUTOCOMMIT=0 yap

Changing Table's storage engine MYSQL

ALTER TABLE t1 ENGINE=InnoDB;

MySQL Transaction Safe and Transaction Not Safe Tables

What are transaction-safe tables and not transaction-safe tables in MySQL?

I am newbie to MySQL. I want to know about Transaction-Safe Tables (TST) and Not Transaction-Safe Tables (NTST). Can you help me to explain, what are Transaction-Safe Tables and Not Transaction-Safe Tables in MySQL?
Answer No: 162

MySQL supports two different kinds of tables: Transaction-Safe Tables (InnoDB and BDB etc) and Not Transaction-Safe Tables (HEAP, MERGE, and MyISAM etc). MySQL also allows to combine Transaction-Safe Tables and Not Transaction-Safe Tables tables in the same database to get the best results. However, each kind of tables has its own advantages.
Advantages of Transaction-Safe Tables

1. Safer. Even if MySQL crashes or you get hardware problems, you can get your data back, either by automatic recovery or from a backup + the transaction log.
2. You can combine many statements and accept these all in one go with the COMMIT command.
3. You can execute ROLLBACK to ignore your changes (if you are not running in auto-commit mode).
4. If an update fails, all your changes will be restored.

Advantages of Not Transaction-Safe Tables

1. Much faster as there is no transaction overhead.
2. Will use less disk space as there is no overhead of transactions.
3. Will use less memory to perform updates.

With Not Transaction-Safe Tables: If an update fails, no change will be restored as changes that have taken place are permanent.

MYSQL de bir tablonun hangi storage engine i kullandigi

SELECT ENGINE
FROM information_schema.TABLES
WHERE TABLE_SCHEMA = 'test'
AND TABLE_NAME = 'products'