List:General Discussion« Previous MessageNext Message »
From:Gerald Clark Date:February 1 2002 8:28pm
Subject:Re: 'desc' and column names
View as plain text  
'desc' is a reserved word.
If you insist on using it for a field name, enclose it in back-ticks: `desc`

vinko@stripped wrote:

>>Description:
>>
>
>	If you create a table with a column name called 'desc' (as the command,
>	that is, without the '') mysql allows to create it, but then you
>	can't query or do any operation with it, always giving an error like:
>	You have an error in your SQL syntax near desc='foo' where nombre='v5'
>	
>
>>How-To-Repeat:
>>
>
>	create a table with a column called desc, then perform any operation 
>	with that column (update, alter, etc.)
>
>>Fix:
>>
>
>	May be not allowing to create a column called that way or allowing
>	it and not giving the error :-)
>
>>Submitter-Id:	<submitter ID>
>>Originator:	vinko
>>Organization:
>>
> 
>
>>MySQL support: none
>>Synopsis:	calling a column desc prevents executing any command on it
>>Severity:	serious
>>Priority:	medium
>>Category:	mysql
>>Class:		sw-bug
>>Release:	mysql-3.23.41 (Mandrake Linux MySQL RPM)
>>
>
>>Environment:
>>
>System: Linux landsat.cprsig.cl 2.4.8-34.1mdk #1 Mon Nov 19 12:40:39 MST 2001 i686
> unknown
>Architecture: i686
>
>Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc
>GCC: Reading specs from /usr/lib/gcc-lib/i586-mandrake-linux-gnu/2.96/specs
>gcc version 2.96 20000731 (Mandrake Linux 8.1 2.96-0.62mdk)
>Compilation info: CC='gcc'  CFLAGS='-O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro
> -march=i586 -ffast-math -fno-strength-reduce -fno-omit-frame-pointer'  CXX='g++' 
> CXXFLAGS='-O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -ffast-math
> -fno-strength-reduce -fno-omit-frame-pointer'  LDFLAGS=''
>LIBC: 
>lrwxrwxrwx    1 root     root           13 ene 17 21:21 /lib/libc.so.6 ->
> libc-2.2.4.so
>-rwxr-xr-x    1 root     root      1285896 dic 17 22:19 /lib/libc-2.2.4.so
>-rw-r--r--    1 root     root     27470790 dic 17 21:05 /usr/lib/libc.a
>-rw-r--r--    1 root     root          178 dic 17 21:05 /usr/lib/libc.so
>Configure command: ./configure  --enable-shared --enable-thread-safe-client
> --enable-assembler --with-mysqld-user=mysql
> --with-unix-socket-path=/var/lib/mysql/mysql.sock --prefix=/ --with-extra-charsets=complex
> --exec-prefix=/usr --libexecdir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share
> --localstatedir=/var/lib/mysql --infodir=/usr/share/info --includedir=/usr/include
> --mandir=/usr/share/man --with-berkeley-db --without-innobase '--with-comment=Mandrake
> Linux MySQL RPM'
>
>
>---------------------------------------------------------------------
>Before posting, please check:
>   http://www.mysql.com/manual.php   (the manual)
>   http://lists.mysql.com/           (the list archive)
>
>To request this thread, e-mail <mysql-thread98334@stripped>
>To unsubscribe, e-mail
> <mysql-unsubscribe-gerald_clark=suppliersystems.com@stripped>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>


Thread
'desc' and column namesvinko1 Feb
  • Re: 'desc' and column namesGerald Clark1 Feb