...

View Full Version : Is "desc" a reserved word?



CyberPirate
03-19-2009, 08:59 PM
I'm trying to run a SQL query and I recieve some lame SQL error even though there's nothing wrong with it, and one of the fields it complains about is my field name "desc". So I was wondering if I get this error because the word is reserved?

steelaz
03-19-2009, 09:04 PM
It is reserved, you should surround your column name in backtik quotes: `desc`

CFMaBiSmAd
03-19-2009, 09:04 PM
http://dev.mysql.com/doc/refman/5.1/en/reserved-words.html

Fou-Lu
03-19-2009, 11:23 PM
Moving to MySQL forum.

guelphdad
03-20-2009, 02:44 AM
It is reserved, you should surround your column name in backtik quotes: `desc`

actually that is a bad habit, the backticks are proprietary to mysql (won't work in any other db), you should never use a reserved word.

CyberPirate, what prevented you from checking the manual? Probably take the same amount of time as posting? ;-)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum