Re: Need unique constraint on data table

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Hugo Kornelis (hugo_at_pe_NO_rFact.in_SPAM_fo)
Date: 08/06/04

  • Next message: Paul: "Re: Need unique constraint on data table"
    Date: Fri, 06 Aug 2004 17:59:31 +0200
    
    

    On Fri, 6 Aug 2004 08:47:04 -0700, Paul wrote:

    >Thanks for the information. Was not aware that you could include more than 1
    >column to create a primary key. I noticed in enterprize manager if you right
    >click on the table and select design table and then right click on the design
    >table menu and select indexes/keys it has an option to create UNIQUE
    >Constraint, but looks like it is only for a single column, not sure.

    Hi Paul,

    Like a PRIMARY KEY constraint, a UNIQUE constraint may span several
    columns as well. And like the PRIMARY KEY constraint, I urge you to use
    SQL statements throug Query Analyzer to define it, instead of working
    through Enterprise Manager. In fact, I'd advise you to do all DDL (data
    definition language - creating, modifying and dropping tables, indexes,
    constraints, etc) with SQL statements through Query Analyzer.

    Enterprise Manager is a great tool for administrating the database (doing
    ad-hoc or scheduled backups, restoring, managing users and permissions,
    setting up repication, DTS, etc), but it really shouldn't be used for
    other tasks.

    Best, Hugo

    -- 
    (Remove _NO_ and _SPAM_ to get my e-mail address)
    

  • Next message: Paul: "Re: Need unique constraint on data table"

    Relevant Pages

    • Re: Need unique constraint on data table
      ... I am using a stored procedure to ... >>column to create a primary key. ... And like the PRIMARY KEY constraint, ... > Enterprise Manager is a great tool for administrating the database (doing ...
      (microsoft.public.sqlserver.setup)
    • Re: Unique and non unique index
      ... If you want to enforce a primary key constraint, create a primary key for the table. ... If you need an index for performance reasons, create a non-unique index. ...
      (comp.databases.oracle.misc)
    • Re: orace sql query
      ... enforcement. ... "Oracle enforces all PRIMARY KEY constraints using indexes. ... If a usable index exists when a primary key constraint is ...
      (comp.databases.oracle.server)
    • Re: Identifing Relationships
      ... Enterprise Manager for SS 6.5 doesn't have database diagrams and you can not ... Thats how I understood our database. ... Is it possible in either Enterprise Manager, or> Access, to find out which foreign keys relate to what Primary key?? ...
      (microsoft.public.sqlserver.server)
    • Re: What does "primary" key mean?
      ... the inventors of the relational model decided that we need to decide ... but what's the idea behind a primary key? ... > primary key-ness and mere uniqueness? ...
      (microsoft.public.sqlserver.programming)