开发者

How can I get the column names of a table referred by a dblink?

开发者 https://www.devze.com 2023-04-12 04:58 出处:网络
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 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.


select column_name
  from all_tab_columns@MY_DBLINK
 where table_name = 'MY_TABLE'
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号