Ask Your Question
4

How can you obtain the name of a column using a db link in Oracle 11g?

asked 2023-06-11 05:16:15 +0000

pufferfish gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2023-06-11 05:43:02 +0000

lakamha gravatar image

To obtain the name of a column using a db link in Oracle 11g, you can use the following SQL query:

SELECT COLUMNNAME FROM ALLTABCOLUMNS@DBLINKNAME WHERE TABLENAME = 'TABLENAME' AND COLUMNID = COLUMN_NUMBER;

Replace the following placeholders in the query:

  • DBLINKNAME: the name of the database link
  • TABLE_NAME: the name of the table you want to get the column name from
  • COLUMN_NUMBER: the number of the column you want to get the name for

Execute the query and it will return the name of the column you specified.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-06-11 05:16:15 +0000

Seen: 13 times

Last updated: Jun 11 '23