Good morning guys ... I need to identify which columns are primary key via select ....
thanks for now
Identify Fields Primary Key
-
- Moderador
- Posts: 1396
- Joined: Fri, 01 Feb 2008 2:06 pm
- Location: Rio de Janeiro - RJ
- Contact:

select * from all_constraints where table_name = 'nomeTabela' and constraint_type = 'P'
-
- Moderador
- Posts: 1396
- Joined: Fri, 01 Feb 2008 2:06 pm
- Location: Rio de Janeiro - RJ
- Contact:

select column_name
from all_cons_columns acc,
all_constraints ac
where acc.table_name = ac.table_name
and ac.table_name = 'SUA_TABELA'
and ac.constraint_type = 'P'
- dr_gori
- Moderador
- Posts: 5027
- Joined: Mon, 03 May 2004 3:08 pm
- Location: Portland, OR USA
- Contact:
Thomas F. G
Você já respondeu a dúvida de alguém hoje?
https://glufke.net/oracle/search.php?search_id=unanswered
Você já respondeu a dúvida de alguém hoje?
https://glufke.net/oracle/search.php?search_id=unanswered
It has this query that I made a time ago: http://en.glufke.net/oracle/viewtopic.php?t=883
She shows the fields of constraints side by side
She shows the fields of constraints side by side

-
- Information
-
Who is online
Users browsing this forum: No registered users and 1 guest