List:General Discussion« Previous MessageNext Message »
From:Rik Wasmus Date:July 6 2011 3:10pm
Subject:RE: dumb question?
View as plain text  
On Wed, 2011-07-06 at 11:03 -0400, Martin Gainty wrote:
> Rik and Crew

Please keep your replies to the list only, I don't need to double on
e-mail...

> String values are always ticked VALUES('MYNAME') unless ANSI_QUOTES are enabled
> Column names are never surrounded by ticks or double quotes

They surely can, and in this case, are.

>  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');

May I quote:

> > > (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 

See the double quotes around the column name? Aye? 'nuff said.

> Bedankt,
> Martin

Graag gedaan,
-- 
Rik

Thread
dumb question?XL Cordemans6 Jul
  • Re: dumb question?Rik Wasmus6 Jul
    • Re: dumb question?Rik Wasmus6 Jul
      • RE: dumb question?Martin Gainty6 Jul
        • RE: dumb question?Rik Wasmus6 Jul
    • Re: dumb question?XL Cordemans7 Jul
      • Re: dumb question?hsv7 Jul