whats with the `quotes` ?

whats with the `quotes` ?

am 27.02.2006 23:51:19 von Tony Peardon

Hi all. I've noticed people encasing their table and column names within
quotes. Whats up with that? my db seems to be working ok so far without
them, so what are they for? Should I be doing the same?

Re: whats with the `quotes` ?

am 28.02.2006 00:04:11 von Andy Hassall

On Mon, 27 Feb 2006 22:51:19 GMT, "Tony Peardon"
wrote:

>Hi all. I've noticed people encasing their table and column names within
>quotes. Whats up with that? my db seems to be working ok so far without
>them, so what are they for? Should I be doing the same?

No. You only need `` around table and column names if they have spaces or in
them, or clash with reserved words.

You should only use `` if you need it.

But if you need to use ``, your table or column is named wrongly, and should
be renamed so you don't need to use ``.

(And the standard way to quote weird table/column names is with double quotes
anyway - backticks are MySQL-specific.)

--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool