Re: Primary Key question

2005-07-01 Thread Haisam K. Ido
so if I do want 'name' to be unique I must not make it primary, just simply unique, since my primary key is for id and name simultaneously. [EMAIL PROTECTED] wrote: your primary key is based on your (auto-increment) id and the name, PRIMARY KEY (`id`,`name`) so your two entries would be

Re: Primary Key question

2005-07-01 Thread Alec . Cawley
"Haisam K. Ido" <[EMAIL PROTECTED]> wrote on 01/07/2005 15:04:01: > > I've created the following table (server 4.1 in win2k) > > CREATE TABLE `os` ( >`id` tinyint(10) NOT NULL auto_increment, >`name` varchar(255) NOT NULL default '', >`description` varchar(255) default NULL, >PRI

Re: Primary Key Question

2005-06-16 Thread Peter Brawley
Hendro, In SQL an empty string is not null. PB Hendro Suryawan wrote: Hi all, I have table with primary key on field PO,BrgId, NOSP but when i try insert several new reccord with field NOSP = '', mysql will accept the new reccord without complaint error. Is this normal behavior? My perception

Re: Primary Key Question

2005-06-16 Thread SGreen
Hendro Suryawan <[EMAIL PROTECTED]> wrote on 06/16/2005 06:53:31 PM: > Hi all, > I have table with primary key on field PO,BrgId, NOSP but when i try > insert several new reccord with field NOSP = '', mysql will accept the > new reccord without complaint error. > Is this normal behavior? As long

Re: Primary key question

2002-12-17 Thread Steve Yates
On Tue, 17 Dec 2002 19:15:08 +0100, Serrand Patrice wrote: >Does MySQL automatically create index on primary key ? Yes. See http://www.mysql.com/doc/en/CREATE_TABLE.html - Steve Yates - Antonym: The opposite of the word you're searching for. ~ Taglines by Taglinator - www.srtware.com ~ ---

re: Primary Key Question

2002-12-16 Thread Victoria Reznichenko
On Monday 16 December 2002 18:12, tmb wrote: > I understood that MySQL didn't internally keep up with > the relationships between tables... like MS Access... > > And that it was up to the programmer to referential > integrity... > > But I noticed in phpMyAdmin that the offer the option > of definin