def is_unique(conn, table, field):
 rows = query(conn, "\n        SELECT COLS.COLUMN_NAME\n        FROM USER_CONSTRAINTS CONS, ALL_CONS_COLUMNS COLS\n        WHERE CONS.OWNER = COLS.OWNER\n          AND CONS.CONSTRAINT_NAME = COLS.CONSTRAINT_NAME\n          AND CONS.CONSTRAINT_TYPE = 'U'\n          AND COLS.TABLE_NAME = :t\n          AND COLS.COLUMN_NAME = :c\n        ", table, field['COLUMN_NAME'])
 return ((rows and True) or False)

def is_unique ( conn , table , field ) : rows = query ( conn , "\n        SELECT COLS.COLUMN_NAME\n        FROM USER_CONSTRAINTS CONS, ALL_CONS_COLUMNS COLS\n        WHERE CONS.OWNER = COLS.OWNER\n          AND CONS.CONSTRAINT_NAME = COLS.CONSTRAINT_NAME\n          AND CONS.CONSTRAINT_TYPE = 'U'\n          AND COLS.TABLE_NAME = :t\n          AND COLS.COLUMN_NAME = :c\n        " , table , field [ 'COLUMN_NAME' ] ) return ( ( rows and True ) or False )
find unique columns .