CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 1 of 1
  1. #1
    Join Date
    Jun 2022
    Location
    Urbana, Illinios
    Posts
    5

    PRIMARY KEY vs. UNIQUE restrictions in MySQL

    The distinction between a PRIMARY KEY constraint and a UNIQUE constraint, according to the MySQL documentation, is that a PK constraint does not permit NULL values whereas a UQ constraint does. One may generate both PK and UQ for the same column in a MySQL table!

    What use does it serve to add a UNIQUE constraint to a column that already has a PK constraint?
    Why won't MySQL let me add a unique constraint to a column with a PK constraint already?

    Click here for more references.

    Also, I want to ask according to internet definitions given in this page, the join condition in equi join is equality (=), whereas inner join can contain additional operators such as less than () or larger than (>). A non-equi join is a sort of join in which the join condition does not employ equals. Does this imply that non-equi joins and inner joins are the same?
    Last edited by Nathan D; September 23rd, 2022 at 01:45 AM. Reason: Grammar mistake

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured