Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- PW Herman
March 26, 2005, 10:31 pm
rate this thread
Does mySQL not like dashes or something? I seem to be getting the
"Unknown column 'etrans' in 'where clause'"
when I do the following query:
SELECT * from expense where etrans-num > 25
If I try:
SELECT * from expense where expense.'etrans-num' > 25
"You have an error in your SQL syntax, Check the manual that
corresponds to your MySQL version for the right syntax to use near
"etrans-num' > 25' at line 1
What's wrong with using dashes in field names?????
Re: mySQL Query Browser errors
PW Herman wrote:
They're too easily confused with the subtraction operator.
FWIW, I can't think of a single programming language that permits dashes
MySQL uses backticks `` as an identifier delimiter, if you need special
characters, spaces, reserved words, etc. in your field names.
SELECT * from expense where expense.`etrans-num` > 25
- » I just ran /usr/bin/mysql_install_db and it told me to set a password for the MySQL root U...
- — Next thread in » MySQL Database Forum
- » Killing one virtual console process from another (IE, killing console session ALT-F1 from...
- — Previous thread in » MySQL Database Forum
- » Americanas.com SALDO de TVs Com at 80% de Desconto (29798)
- — Newest thread in » MySQL Database Forum