Using ODBC to determine column uniqueness.
- From: "Jason D." <Tronman@xxxxxxxxx>
- Date: Mon, 12 May 2008 11:11:25 -0700 (PDT)
Hey folks, at the moment I really don't think this is possible but
decided to throw it on here to see if there were any ideas.
Essentially, I would like a way to grab any 1) arbitrary table (that I
have permissions to) in DBMS that I have an ODBC connection too; 2) A
column in that table and determine 3) If there are repeated values in
that column.
What I *don't* want to do is check for column uniqueness by doing a
query for the column and check manually if there are repeated values
by either
1) looping through to check for duplicates ( O(n^2) time )
2) Sorting the column and comparing adjacent values ( like O (n^2 log
n) I think)
What I would like an consistent ODBC-ish way to extract the meta data
for the column to determine if it was declared as Unique in the DDL (I
know there could also be unique columns not declared in the DDL but I
don't care about those) which would tell me in constant O(1) time if
it's unique regardless of the DBMS I'm using. Actually, I would really
like more meta data (e.g. check constraints that may have been DDL'd
into the column) but I'd be happy for this.
I know about the INFORMATION_SCHEMA views in the ANSI Standard, but
there are significant DBMS's that do not support (e.g. Oracle) so it's
no good.
Again, I figure this is a dream, but who knows! Thanks!
.
- Follow-Ups:
- Re: Using ODBC to determine column uniqueness.
- From: Dmitriy Ivanov
- Re: Using ODBC to determine column uniqueness.
- Prev by Date: Re: PROBLEM WITH MYSQL ODBC DRIVER 3.51
- Next by Date: Re: Using ODBC to determine column uniqueness.
- Previous by thread: PROBLEM WITH MYSQL ODBC DRIVER 3.51
- Next by thread: Re: Using ODBC to determine column uniqueness.
- Index(es):
Relevant Pages
|
|