[DB-SIG] How to escape special field name, mysql?

Paul Boddie paul at boddie.org.uk
Wed Aug 8 00:40:29 CEST 2007


On Tuesday 07 August 2007 19:17, Carsten Haese wrote:
> On Tue, 2007-08-07 at 11:58 -0500, Lukasz Szybalski wrote:
> >
> > When i do:
> > insert into tablename(id,desc)VALUES(1,'some text')
> >
> > How do I escape 'desc'?
>
> insert into tablename(id,`desc`) ...

Obviously MySQL supports the above, but I believe that the standard way is to 
use double quotes:

insert into tablename (id, "desc") values (1, 'some text')

For your information, of course.

Paul


More information about the DB-SIG mailing list