MySQL Forums
Forum List  »  Newbie

Re: What is wrong with the hyphen?
Posted by: Jay Alverson
Date: January 24, 2009 05:20PM

You can use them in Field Names, providing you use the backtick character around them like

SELECT `This-Field` from TABLE...

Haven't tried them anywhere else.

`hss@hss.technikum-wien.at` or maybe try escaping them like hss@hss.technikum\-wien.at and see what happens.

I named my Binary Log file with a hyphen/dash and it caused MYSQLD to GPF. As soon as I got rid of the hyphen it worked fine.

I think MYSQL is slowly evolving into what other packages can do. It used to be a no-no to have columns with spaces in the names. I exported a table from Access to MYSQL and it worked fine, but all my queries died since Access lets you place [Name with Space in it] around those types of columns.

Now it's legal, providing you use the backtick `` for quoting.

>

Thanks, Jay

Options: ReplyQuote


Subject
Written By
Posted
January 24, 2009 02:31PM
Re: What is wrong with the hyphen?
January 24, 2009 05:20PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.