Hello
I created a table innodb
Code:CREATE TABLE `innodb` ( `id` int(5) NOT NULL auto_increment, `name` varchar(9) collate latin1_general_ci NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=21 ;
and inserted some data into it
Code:INSERT INTO `innodb` (`id`, `name`) VALUES (4, 'bean'), (16, 'beep'), (8, 'bindas'), (14, 'done'), (20, 'harry'), (12, 'heal'), (7, 'indus'), (3, 'jim'), (18, 'laula'), (15, 'lip'), (13, 'none'), (5, 'olive'), (10, 'paul'), (17, 'paula'), (9, 'popla'), (6, 'raphel'), (2, 'saurab'), (1, 'hem'), (19, 'tom'), (11, 'zeal');
and when I ran a query to lock the table
Code:SELECT * FROM `innodb` LOCK IN SHARE MODE LIMIT 0 , 30
I got the following error:
Code:Error SQL query: Documentation SELECT * FROM `innodb` LOCK IN SHARE MODE LIMIT 0 , 30 MySQL said: Documentation #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 0, 30' at line 2
I was wondering what wrong in my query.
Please assist.
Many Thanks


Reply With Quote
Bookmarks