üÄÕÁÒÄ óÕÒÏ× wrote:
> 
> Hi all!
> 

Hi,

> Sorry for the dumb question, but am I right in the following suggestion:
> 
> I have the following table:
> 
> create table tab_1 (
>         field_1 integer not null,
>         field_2 integer not null,
>         primary key (field_1, field_2));
> 
> Does it mean that this key requires unique COMBINATION of field_1 and
> field_2? For example, at first I add:

Yes

> 
> insert into tab_1 values ('2', '3');
> insert into tab_1 values ('3', '4');
> 
> Then I'd like to add the following:
> 
> insert into tab_1 values ('3', '2');
> 
> Here field_1 is NOT unique, but combination of field_1 and field_2 IS
> unique. Will I get an error in this case?

No

> 
> Thanx for the answers!
> 
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
> 
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Regards
--
Joseph Bueno
NetClub/Trader.com

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

  • ... Эдуард Суров
    • ... Joseph Bueno
    • ... Dave Carter
      • ... karel pitra
    • ... karel pitra

Reply via email to