I have a table in Oracle People,
nombre varchar2 unique
apellido varchar2
edad int
I would like to know what the query is to know which field of the table is unique
I have a table in Oracle People,
nombre varchar2 unique
apellido varchar2
edad int
I would like to know what the query is to know which field of the table is unique
hello looking for the schema
SELECT * FROM ALL_CONSTRAINTS WHERE OWNER = 'schemaName'
on sql server would be
SELECT
[schema] = OBJECT_SCHEMA_NAME([object_id]),
[table] = OBJECT_NAME([object_id]),
[index] = name,
is_unique_constraint,
is_unique,
is_primary_key
FROM sys.indexes
Remembering that the schema name is generally case insensitive and needs to be given in uppercase, for example 'WHERE OWNER =' MYSCHEMA '.