Обсуждение: SQL: Are the "" around table & coloumnames necessary?

Поиск
Список
Период
Сортировка

SQL: Are the "" around table & coloumnames necessary?

От
mikey.unsafe@gmx.net (Mikey)
Дата:
Hello,

when I  write a select for example,
it doesn't work this way:

   select col1, col2
      from my_table;

instead of that I have to write

   select "col1", "col2"
      from "my_table";

I dont understand this...is there a way to use
the more comfortable form without "" ?

thx

...Mike

Re: SQL: Are the "" around table & coloumnames necessary?

От
Doug McNaught
Дата:
mikey.unsafe@gmx.net (Mikey) writes:

> Hello,
>
> when I  write a select for example,
> it doesn't work this way:
>
>    select col1, col2
>       from my_table;
>
> instead of that I have to write
>
>    select "col1", "col2"
>       from "my_table";
>
> I dont understand this...is there a way to use
> the more comfortable form without "" ?

Double-quotes should only be necessary if your table names are
MixedCase.

-Doug
--
Let us cross over the river, and rest under the shade of the trees.
   --T. J. Jackson, 1863