List:General Discussion« Previous MessageNext Message »
From:Dan Nelson Date:May 20 2002 5:36am
Subject:Re: query - primary key
View as plain text  
In the last episode (May 20), Sameer Maggon said:
> Hi, 
>   I have a table with four colums
>   
>   id
>   date
>   time
>   addr - varchar (used my sql C API)
> 
>   I want that when i add an entry, the PRIMARY KEY IS ALL OF THEM
>   means that no entry should repeat.
> 
>   I used ALTER TABLE sss ADD PRIMARY KEY (all four field)
> 
>   but not when i add my things, after 104 items, it gives an
>   error, DUPLICATE ENTRY

Paste in the full error message, and if you made 'id' a TINYINT
AUTO_INCREMENT, think very very carefully about the rage of a TINYINT.

-- 
	Dan Nelson
	dnelson@stripped
Thread
query - primary keySameer Maggon20 May
  • Re: query - primary keyDan Nelson20 May
Re: query - primary keySameer Maggon20 May
  • Re: query - primary keyDan Nelson20 May
Re: query - primary keySameer Maggon20 May
Re: query - primary keyAmer Neely20 May