Rik and Crew
String values are always ticked VALUES('MYNAME') unless ANSI_QUOTES are enabled
Column names are never surrounded by ticks or double quotes so
TABLE table_name
FOO VARCHAR(30)
</snip>
where the INSERT statement for table table_name column FOO would look like:
INSERT INTO table_name FOO VALUES('VALUES ARE ALWAYS SURROUNDED BY TICK MARKS 
UNLESS ANSI_QUOTES ARE ENABLED');

Bedankt,
Martin

> Subject: Re: dumb question?
> From: rik.was...@grib.nl
> To: mysql@lists.mysql.com
> Date: Wed, 6 Jul 2011 16:39:16 +0200
> 
> On Wed, 2011-07-06 at 16:27 +0200, Rik Wasmus wrote:
> > On Wed, 2011-07-06 at 07:15 -0700, XL Cordemans wrote:
> > > (error code) 1064
> > > (error message) HY000 [Actual][MySQL] 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 '"DMPPRuser") VALUES ('MYNAME')' at line 
> > > 1 
> > 
> > You'll need to enable ANSI_QUOTES to be able the use '"' as an
> > identifier quote character rather then MySQL's default '`'.
> > 
> > See:
> > http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html#sqlmode_ansi_quotes
> 
> Oh, and if possible, go for even more standards-compliant:
> http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html#sqlmode_ansi
> 
> -- 
> Rik
> 
> 
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql?unsub=mgai...@hotmail.com
> 
                                          

Reply via email to