Test if Data for a Field is UNIQUE



Hello,

In Oracle 9i R2 on Solaris 8 I have a table (LOCATION) that has data.
I want to create a Foreign Key (FK) and base it on an existing field
(location_key) in this table. I am not 100% sure the values are unique
(which is required to make it a FK for a child table).

Can someone please share SQL that can be used to determine if the
values in my LOCATION table field location_key field are UNIQUE?

Thanks,

Michael42

.



Relevant Pages

  • Re: Full text search not giving any results
    ... You're welcome, Sirisha, ... Full Text Search Adobe PDF files stored in SQL Server... ... SQL Server 2000 Full-Text Search Resources and Links ... > FOREIGN KEY ...
    (microsoft.public.sqlserver.fulltext)
  • Re: Hypersonic SQL and foreign keys
    ... I've heard that Hypersonic SQL doesn't support foreign keys? ... > is a bit confusing. ... I can't tell you about Hypersonic's foreign key support, but your SQL is a problem. ... > username. ...
    (comp.lang.java.databases)
  • Re: Timeout or other timing-type problem???
    ... In your place I would trace the sql statements issued to sql server, either log them from code or even better, log them using sql tools. ... The INSERT statement conflicted with the FOREIGN KEY constraint ... How do I ensure it is exact? ... Here is how I'm establishing my connection and setting up my ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: dynamic check boxes
    ... change names in SQL & VB Code. ... preview a sample report, ALL volunteers print out, even tho only 3 checked. ... > the "key" to how the setup works is in the tables' primary and foreign key ... >> Richard Harison ...
    (microsoft.public.access.formscoding)
  • Re: FK to a view?
    ... To derive practical benefits, in a relational ... Since a view in SQL is not fully ... implemented in accordance with a view in relational model, ... create a foreign key on a view cannot be provided in SQL. ...
    (microsoft.public.sqlserver.programming)