Обсуждение: cursors and column names

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

cursors and column names

От
John DeSoi
Дата:
If a cursor selects from multiple tables is there any way to
distinguish columns from two tables that have the same name? The
column information returned does not appear to have any information
to associate a column with a table.

Thanks,

John DeSoi, Ph.D.

Re: cursors and column names

От
Richard Huxton
Дата:
On Friday 21 Feb 2003 4:01 am, John DeSoi wrote:
> If a cursor selects from multiple tables is there any way to
> distinguish columns from two tables that have the same name? The
> column information returned does not appear to have any information
> to associate a column with a table.

Something very similar came up just the other day. Alias the table names, and
then you can pick them out.

SELECT f.x,f.y,b.x,b.y FROM foo f, bar b;

--
  Richard Huxton