On Tue, Apr 15, 2008 at 7:27 AM, Paul DuBois <[EMAIL PROTECTED]> wrote: > > At 10:32 AM +0530 4/15/08, Krishna Chandra Prajapati wrote: > > > Hi, > > > > I have created a table name group. > > > > CREATE TABLE `group` ( > > `group_id` int(11) NOT NULL, > > `group_name` varchar(128) NOT NULL, > > `date_created` datetime NOT NULL, > > `created_by` int(11) NOT NULL, > > `modified_by` int(11) default NULL, > > `status` char(1) NOT NULL default 'Y', > > PRIMARY KEY (`group_id`) > > ) ENGINE=MyISAM DEFAULT CHARSET=latin1; > > > > The table was successfully created without any errors. > > After that when i try to describe it. Its giving error. > > > > mysql> desc group; > > ERROR 1064 (42000): 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 'group' at line 1 > > mysql> drop table group; > > ERROR 1064 (42000): 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 'group' at line 1 > > > > Does the problem is with table name. > > > > "group" is a reserved word. See this page: > > http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html > > The page also describes how to quote identifiers to avoid > this problem.
Better yet, don't use reserved words... -- Rob Wultsch [EMAIL PROTECTED] wultsch (aim) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]