Thread: cursors and column names

cursors and column names

From
John DeSoi
Date:
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

From
Richard Huxton
Date:
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