7

I am new to oracle. I have a table referred using a dblink, say MY_TABLE@MY_DBLINK. Suppose MY_TABLE has columns like COLUMN_1, COLUMN_2. How can I write a query to return the column names?

I tried to use DESCRIBE MY_TABLE@MY_DBLINK. But it is showing the error as "ERROR: object MY_TABLE does not exist". But I am able to display the contents of the same table using SELECT.

988875
  • 1,477
  • 3
  • 12
  • 12
  • It is interesting, but at least in Oracle 10g+ the SQL+ tool can successfully show the result of the `DESCRIBE MY_TABLE@MY_DBLINK` – Naeel Maqsudov May 19 '20 at 17:49

1 Answers1

11
select column_name
  from all_tab_columns@MY_DBLINK
 where table_name = 'MY_TABLE'
Rob van Wijk
  • 17,555
  • 5
  • 39
  • 55