For instance, having the row-level locking enabled means that, as you execute the following INSERT statement, MySQL will wait until you commit the transaction. MySQL can lock the entire table in various ways, and the type of locking determines the semantics of locking. When you use MyISAM you don't have INNODB_LOCK_MODE therefore you have to tell how you are going to lock your table. It's not because the syntax is not the same that each one is valid, only the first one is a syntactic correcty to MyISAM and the second one is a syntactic correct to InnoDB. The first syntax looks more concise to me, but when I execute the query the second one works fine. Mysql> create table prhdr (name varchar(6) not null, email varchar(50) not null, passwd varchar(40) not null, salt varchar(10) not null, etype varchar(15) not null, PRIMARY KEY (name)) TYPE=MyISAM Mysql> create table prhdr (name varchar(6) not null, email varchar(50) not null, passwd varchar(40) not null, salt varchar(10) not null, etype varchar(15) not null, PRI_KEY (name),) TYPE=MyISAM I have two scripts that use the same table and different mysql syntax. Mysql: why the difference between two scripts? Category:Windows-only software made by MicrosoftQ:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |